create-aiot 2.0.2-dev.1 → 2.0.2-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bin.js +16 -1
- package/lib/index.js +0 -12
- package/lib/template/template.json +2 -12
- package/lib/template/vela-demo/package.json +1 -2
- package/package.json +4 -7
package/lib/bin.js
CHANGED
|
@@ -11,14 +11,29 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
const commander_1 = require("@aiot-toolkit/commander");
|
|
14
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
14
15
|
const _1 = require(".");
|
|
15
16
|
function main() {
|
|
16
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
if (process.argv.length <= 2) {
|
|
19
|
+
const answer = yield (0, prompts_1.select)({
|
|
20
|
+
message: 'Select a framework:',
|
|
21
|
+
choices: [
|
|
22
|
+
{
|
|
23
|
+
value: 'ux'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
value: 'xts'
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
process.argv.push(answer);
|
|
31
|
+
}
|
|
17
32
|
// 创建命令行配置
|
|
18
33
|
const config = {
|
|
19
34
|
name: 'create-aiot',
|
|
20
35
|
description: 'create aiot project',
|
|
21
|
-
version: '
|
|
36
|
+
version: require('../package.json').version,
|
|
22
37
|
commandList: [yield (0, _1.getCrerateXtsCommand)(), yield (0, _1.getUxCreateCommand)()]
|
|
23
38
|
};
|
|
24
39
|
commander_1.Command.registeProgram(config);
|
package/lib/index.js
CHANGED
|
@@ -77,18 +77,6 @@ function getUxCreateCommand() {
|
|
|
77
77
|
validate(value) {
|
|
78
78
|
return TemplateUtil_1.default.validateProjectName(value);
|
|
79
79
|
}
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: 'eslint',
|
|
83
|
-
type: 'confirm',
|
|
84
|
-
description: 'Enabling eslint, if true, will create an eslint file',
|
|
85
|
-
enableInquirer: true,
|
|
86
|
-
defaultValue: false
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
name: 'aspect',
|
|
90
|
-
type: 'string',
|
|
91
|
-
description: '配置aspect名称'
|
|
92
80
|
}
|
|
93
81
|
],
|
|
94
82
|
action: (option) => {
|
|
@@ -6,11 +6,6 @@
|
|
|
6
6
|
"name": "vela-demo",
|
|
7
7
|
"path": "./vela-demo",
|
|
8
8
|
"description": "vela demo template"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"name": "test_git",
|
|
12
|
-
"path": "https://github.com/dcloudio/hello-uniapp.git",
|
|
13
|
-
"description": "this is ..., from git"
|
|
14
9
|
}
|
|
15
10
|
]
|
|
16
11
|
},
|
|
@@ -18,14 +13,9 @@
|
|
|
18
13
|
"type": "xts",
|
|
19
14
|
"demoList": [
|
|
20
15
|
{
|
|
21
|
-
"name": "xts",
|
|
22
|
-
"path": "./xts/app-package-name",
|
|
23
|
-
"description": "xts app template"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "xts2",
|
|
16
|
+
"name": "xts-demo",
|
|
27
17
|
"path": "./xts/app-package-name",
|
|
28
|
-
"description": "
|
|
18
|
+
"description": "xts demo template"
|
|
29
19
|
}
|
|
30
20
|
]
|
|
31
21
|
}
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
"node": ">=8.10"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"start": "aiot
|
|
9
|
+
"start": "aiot start --watch",
|
|
10
10
|
"build": "aiot build",
|
|
11
11
|
"release": "aiot release",
|
|
12
|
-
"watch": "aiot watch --open-nuttx",
|
|
13
12
|
"lint": "eslint --format codeframe --fix --ext .ux,.js src/"
|
|
14
13
|
},
|
|
15
14
|
"devDependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-aiot",
|
|
3
|
-
"version": "2.0.2-dev.
|
|
3
|
+
"version": "2.0.2-dev.3",
|
|
4
4
|
"description": "An easy way to start aiot project",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -19,15 +19,12 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"lib"
|
|
21
21
|
],
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "ssh://xujunjie1@git.mioffice.cn:29418/vela/aiot-toolkit"
|
|
25
|
-
},
|
|
26
22
|
"scripts": {
|
|
27
23
|
"test": "node ./__tests__/create-aiot.test.js"
|
|
28
24
|
},
|
|
29
25
|
"dependencies": {
|
|
30
|
-
"@aiot-toolkit/commander": "2.0.2-dev.
|
|
26
|
+
"@aiot-toolkit/commander": "2.0.2-dev.3",
|
|
27
|
+
"@inquirer/prompts": "^4.1.0",
|
|
31
28
|
"ansi-colors": "^4.1.3",
|
|
32
29
|
"cli-progress": "^3.12.0",
|
|
33
30
|
"simple-git": "^3.19.1"
|
|
@@ -35,5 +32,5 @@
|
|
|
35
32
|
"devDependencies": {
|
|
36
33
|
"@types/cli-progress": "^3.11.0"
|
|
37
34
|
},
|
|
38
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "e143a7038d5efaa59f01b2e2eb98422b1ec01097"
|
|
39
36
|
}
|