Project templates (#295)
Moved default projects from pxtarget.json to libs/templates/
This commit is contained in:
parent
7936517a03
commit
f045942297
0
libs/templates/blocksprj/README.md
Normal file
0
libs/templates/blocksprj/README.md
Normal file
62
libs/templates/blocksprj/main.blocks
Normal file
62
libs/templates/blocksprj/main.blocks
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<xml xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<block type="device_forever">
|
||||||
|
<statement name="HANDLER">
|
||||||
|
<block type="device_show_leds">
|
||||||
|
<field name="LED00">FALSE</field>
|
||||||
|
<field name="LED10">FALSE</field>
|
||||||
|
<field name="LED20">FALSE</field>
|
||||||
|
<field name="LED30">FALSE</field>
|
||||||
|
<field name="LED40">FALSE</field>
|
||||||
|
<field name="LED01">FALSE</field>
|
||||||
|
<field name="LED11">TRUE</field>
|
||||||
|
<field name="LED21">FALSE</field>
|
||||||
|
<field name="LED31">TRUE</field>
|
||||||
|
<field name="LED41">FALSE</field>
|
||||||
|
<field name="LED02">FALSE</field>
|
||||||
|
<field name="LED12">FALSE</field>
|
||||||
|
<field name="LED22">FALSE</field>
|
||||||
|
<field name="LED32">FALSE</field>
|
||||||
|
<field name="LED42">FALSE</field>
|
||||||
|
<field name="LED03">TRUE</field>
|
||||||
|
<field name="LED13">FALSE</field>
|
||||||
|
<field name="LED23">FALSE</field>
|
||||||
|
<field name="LED33">FALSE</field>
|
||||||
|
<field name="LED43">TRUE</field>
|
||||||
|
<field name="LED04">FALSE</field>
|
||||||
|
<field name="LED14">TRUE</field>
|
||||||
|
<field name="LED24">TRUE</field>
|
||||||
|
<field name="LED34">TRUE</field>
|
||||||
|
<field name="LED44">FALSE</field>
|
||||||
|
<next>
|
||||||
|
<block type="device_show_leds">
|
||||||
|
<field name="LED00">FALSE</field>
|
||||||
|
<field name="LED10">FALSE</field>
|
||||||
|
<field name="LED20">FALSE</field>
|
||||||
|
<field name="LED30">FALSE</field>
|
||||||
|
<field name="LED40">FALSE</field>
|
||||||
|
<field name="LED01">FALSE</field>
|
||||||
|
<field name="LED11">FALSE</field>
|
||||||
|
<field name="LED21">FALSE</field>
|
||||||
|
<field name="LED31">FALSE</field>
|
||||||
|
<field name="LED41">FALSE</field>
|
||||||
|
<field name="LED02">FALSE</field>
|
||||||
|
<field name="LED12">FALSE</field>
|
||||||
|
<field name="LED22">FALSE</field>
|
||||||
|
<field name="LED32">FALSE</field>
|
||||||
|
<field name="LED42">FALSE</field>
|
||||||
|
<field name="LED03">FALSE</field>
|
||||||
|
<field name="LED13">FALSE</field>
|
||||||
|
<field name="LED23">FALSE</field>
|
||||||
|
<field name="LED33">FALSE</field>
|
||||||
|
<field name="LED43">FALSE</field>
|
||||||
|
<field name="LED04">FALSE</field>
|
||||||
|
<field name="LED14">FALSE</field>
|
||||||
|
<field name="LED24">FALSE</field>
|
||||||
|
<field name="LED34">FALSE</field>
|
||||||
|
<field name="LED44">FALSE</field>
|
||||||
|
</block>
|
||||||
|
</next>
|
||||||
|
</block>
|
||||||
|
</statement>
|
||||||
|
</block>
|
||||||
|
</xml>
|
16
libs/templates/blocksprj/main.ts
Normal file
16
libs/templates/blocksprj/main.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
basic.forever(() => {
|
||||||
|
basic.showLeds(`
|
||||||
|
. # . # .
|
||||||
|
# . # . #
|
||||||
|
# . . . #
|
||||||
|
. # . # .
|
||||||
|
. . # . .
|
||||||
|
`)
|
||||||
|
basic.showLeds(`
|
||||||
|
. . . . .
|
||||||
|
. . . . .
|
||||||
|
. . . . .
|
||||||
|
. . . . .
|
||||||
|
. . . . .
|
||||||
|
`)
|
||||||
|
})
|
13
libs/templates/blocksprj/pxt.json
Normal file
13
libs/templates/blocksprj/pxt.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "{0} block",
|
||||||
|
"dependencies": {
|
||||||
|
"core": "*",
|
||||||
|
"radio": "*"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"files": [
|
||||||
|
"main.blocks",
|
||||||
|
"main.ts",
|
||||||
|
"README.md"
|
||||||
|
]
|
||||||
|
}
|
8
libs/templates/blocksprj/tsconfig.json
Normal file
8
libs/templates/blocksprj/tsconfig.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"outDir": "built",
|
||||||
|
"rootDir": "."
|
||||||
|
}
|
||||||
|
}
|
0
libs/templates/tsprj/README.md
Normal file
0
libs/templates/tsprj/README.md
Normal file
7
libs/templates/tsprj/main.ts
Normal file
7
libs/templates/tsprj/main.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
basic.showLeds(`
|
||||||
|
. . . . .
|
||||||
|
. # . # .
|
||||||
|
. . . . .
|
||||||
|
# . . . #
|
||||||
|
. # # # .
|
||||||
|
`);
|
12
libs/templates/tsprj/pxt.json
Normal file
12
libs/templates/tsprj/pxt.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "{0} bit",
|
||||||
|
"dependencies": {
|
||||||
|
"core": "*",
|
||||||
|
"radio": "*"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"files": [
|
||||||
|
"main.ts",
|
||||||
|
"README.md"
|
||||||
|
]
|
||||||
|
}
|
8
libs/templates/tsprj/tsconfig.json
Normal file
8
libs/templates/tsprj/tsconfig.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"outDir": "built",
|
||||||
|
"rootDir": "."
|
||||||
|
}
|
||||||
|
}
|
@ -21,46 +21,6 @@
|
|||||||
],
|
],
|
||||||
"githubPackages": false
|
"githubPackages": false
|
||||||
},
|
},
|
||||||
"blocksprj": {
|
|
||||||
"id": "blocksprj",
|
|
||||||
"config": {
|
|
||||||
"name": "{0} block",
|
|
||||||
"dependencies": {
|
|
||||||
"core": "*",
|
|
||||||
"radio": "*"
|
|
||||||
},
|
|
||||||
"description": "",
|
|
||||||
"files": [
|
|
||||||
"main.blocks",
|
|
||||||
"main.ts",
|
|
||||||
"README.md"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"files": {
|
|
||||||
"main.blocks": "<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n<block type=\"device_forever\">\n<statement name=\"HANDLER\">\n<block type=\"device_show_leds\">\n<field name=\"LED00\">FALSE</field>\n<field name=\"LED10\">FALSE</field>\n<field name=\"LED20\">FALSE</field>\n<field name=\"LED30\">FALSE</field>\n<field name=\"LED40\">FALSE</field>\n<field name=\"LED01\">FALSE</field>\n<field name=\"LED11\">TRUE</field>\n<field name=\"LED21\">FALSE</field>\n<field name=\"LED31\">TRUE</field>\n<field name=\"LED41\">FALSE</field>\n<field name=\"LED02\">FALSE</field>\n<field name=\"LED12\">FALSE</field>\n<field name=\"LED22\">FALSE</field>\n<field name=\"LED32\">FALSE</field>\n<field name=\"LED42\">FALSE</field>\n<field name=\"LED03\">TRUE</field>\n<field name=\"LED13\">FALSE</field>\n<field name=\"LED23\">FALSE</field>\n<field name=\"LED33\">FALSE</field>\n<field name=\"LED43\">TRUE</field>\n<field name=\"LED04\">FALSE</field>\n<field name=\"LED14\">TRUE</field>\n<field name=\"LED24\">TRUE</field>\n<field name=\"LED34\">TRUE</field>\n<field name=\"LED44\">FALSE</field>\n<next>\n<block type=\"device_show_leds\">\n<field name=\"LED00\">FALSE</field>\n<field name=\"LED10\">FALSE</field>\n<field name=\"LED20\">FALSE</field>\n<field name=\"LED30\">FALSE</field>\n<field name=\"LED40\">FALSE</field>\n<field name=\"LED01\">FALSE</field>\n<field name=\"LED11\">FALSE</field>\n<field name=\"LED21\">FALSE</field>\n<field name=\"LED31\">FALSE</field>\n<field name=\"LED41\">FALSE</field>\n<field name=\"LED02\">FALSE</field>\n<field name=\"LED12\">FALSE</field>\n<field name=\"LED22\">FALSE</field>\n<field name=\"LED32\">FALSE</field>\n<field name=\"LED42\">FALSE</field>\n<field name=\"LED03\">FALSE</field>\n<field name=\"LED13\">FALSE</field>\n<field name=\"LED23\">FALSE</field>\n<field name=\"LED33\">FALSE</field>\n<field name=\"LED43\">FALSE</field>\n<field name=\"LED04\">FALSE</field>\n<field name=\"LED14\">FALSE</field>\n<field name=\"LED24\">FALSE</field>\n<field name=\"LED34\">FALSE</field>\n<field name=\"LED44\">FALSE</field>\n</block>\n</next>\n</block>\n</statement>\n</block>\n</xml>",
|
|
||||||
"main.ts": "basic.forever(() => {\r\n basic.showLeds(`\r\n . # . # .\r\n # . # . #\r\n # . . . #\r\n . # . # .\r\n . . # . .\r\n `)\r\n basic.showLeds(`\r\n . . . . .\r\n . . . . .\r\n . . . . .\r\n . . . . .\r\n . . . . .\r\n `)\r\n})\r\n",
|
|
||||||
"README.md": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tsprj": {
|
|
||||||
"id": "tsprj",
|
|
||||||
"config": {
|
|
||||||
"name": "{0} bit",
|
|
||||||
"dependencies": {
|
|
||||||
"core": "*",
|
|
||||||
"radio": "*"
|
|
||||||
},
|
|
||||||
"description": "",
|
|
||||||
"files": [
|
|
||||||
"main.ts",
|
|
||||||
"README.md"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"files": {
|
|
||||||
"main.ts": "basic.showLeds(`\r\n . . . . .\r\n . # . # .\r\n . . . . .\r\n # . . . #\r\n . # # # .\r\n `);",
|
|
||||||
"README.md": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compile": {
|
"compile": {
|
||||||
"isNative": false,
|
"isNative": false,
|
||||||
"hasHex": true,
|
"hasHex": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user