cloudcc-cli 1.2.4 → 1.2.5
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/README.md +8 -0
- package/package.json +1 -1
- package/src/builderPlugin.js +8 -2
package/README.md
CHANGED
package/package.json
CHANGED
package/src/builderPlugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { exec
|
|
1
|
+
const { exec } = require('child_process');
|
|
2
2
|
const { post } = require('../utils/http');
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require("path")
|
|
@@ -16,6 +16,7 @@ class Builder {
|
|
|
16
16
|
devConsoleConfig: {
|
|
17
17
|
},
|
|
18
18
|
}
|
|
19
|
+
this.plugin = process.argv.splice(2)[0]
|
|
19
20
|
}
|
|
20
21
|
async init() {
|
|
21
22
|
let res = await checkUpdate();
|
|
@@ -27,7 +28,12 @@ class Builder {
|
|
|
27
28
|
config = { "accessToken": await this.getToken(config) };
|
|
28
29
|
}
|
|
29
30
|
// 获得用户输入
|
|
30
|
-
let answers
|
|
31
|
+
let answers;
|
|
32
|
+
if (this.plugin) {
|
|
33
|
+
answers = { buildFileName: this.plugin }
|
|
34
|
+
} else {
|
|
35
|
+
answers = await this.ask();
|
|
36
|
+
}
|
|
31
37
|
// 如果输入的是*.vue,那么表示编译全部文件
|
|
32
38
|
if ("*.vue" == answers.buildFileName) {
|
|
33
39
|
let dirs = fs.readdirSync("plugin")
|