cloudcc-cli 1.2.0 → 1.2.2
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 +14 -0
- package/bin/buildtag.js +1 -1
- package/bin/publishh5.js +1 -1
- package/cloudcc-cli +3332 -0
- package/cookies.html +1 -0
- package/package.json +3 -2
- package/src/creatorTemProject.js +2 -1
- package/src/publishProject.js +4 -4
- package/src/publishProjectH5.js +2 -2
- package/template/httpjs +4 -4
- package/template/index.js +4 -0
- package/template/indexvue +0 -1
- package/template/package-lockjson +12168 -0
- package/template/packagejson +1 -0
- package/utils/checkVersion.js +14 -3
- package/utils/test.js +2 -4
package/template/packagejson
CHANGED
package/utils/checkVersion.js
CHANGED
|
@@ -8,9 +8,20 @@ const chalk = require("chalk")
|
|
|
8
8
|
*/
|
|
9
9
|
function checkNpmVersion() {
|
|
10
10
|
let currentVersion = Number(config.version.replace(/\./g, ""));
|
|
11
|
-
let
|
|
12
|
-
onlineVersion =
|
|
13
|
-
|
|
11
|
+
let onlineVersionNum
|
|
12
|
+
let onlineVersion = '0.0.1'
|
|
13
|
+
|
|
14
|
+
// 从npm官网获取版本号
|
|
15
|
+
// onlineVersion = exec(`npm view cloudcc-cli version --registry http://registry.npmjs.org`)
|
|
16
|
+
// onlineVersion = onlineVersion.toString("utf8").trim();
|
|
17
|
+
|
|
18
|
+
// 从阿里源获取版本号
|
|
19
|
+
try {
|
|
20
|
+
onlineVersion = exec(`curl -s http://www.npmmirror.com/package/cloudcc-cli`)
|
|
21
|
+
onlineVersion = onlineVersion.toString("utf8").trim().split('img title="')[1].split('" src')[0];
|
|
22
|
+
} catch (e) {
|
|
23
|
+
}
|
|
24
|
+
onlineVersionNum = Number(onlineVersion.replace(/\./g, ""));
|
|
14
25
|
// 如果结果大于0,那么提示升级
|
|
15
26
|
if (onlineVersionNum - currentVersion > 0) {
|
|
16
27
|
console.log();
|
package/utils/test.js
CHANGED