cloudcc-cli 1.4.0 → 1.4.1
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 +9 -0
- package/bin/buildtag.js +1 -1
- package/bin/publishh5.js +1 -1
- package/package.json +3 -4
- package/src/builderPlugin.js +3 -1
- package/src/publishProjectH5.js +6 -1
- package/utils/md2html.js +1 -1
package/README.md
CHANGED
package/bin/buildtag.js
CHANGED
package/bin/publishh5.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcc-cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "cloudcc-cli",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudcc",
|
|
@@ -29,11 +29,10 @@
|
|
|
29
29
|
"crypto-js": "^4.1.1",
|
|
30
30
|
"dayjs": "^1.10.7",
|
|
31
31
|
"inquirer": "^8.1.0",
|
|
32
|
-
"marked": "^
|
|
33
|
-
"md-to-html": "^1.0.2",
|
|
32
|
+
"marked": "^5.0.1",
|
|
34
33
|
"mem-fs": "^2.2.1",
|
|
35
34
|
"mem-fs-editor": "^9.0.1",
|
|
36
35
|
"vue-custom-element": "^3.3.0",
|
|
37
36
|
"vue-template-compiler": "^2.6.14"
|
|
38
37
|
}
|
|
39
|
-
}
|
|
38
|
+
}
|
package/src/builderPlugin.js
CHANGED
|
@@ -171,7 +171,9 @@ class Builder {
|
|
|
171
171
|
"category": obj.category,
|
|
172
172
|
"belongOrgFlag": this.options.devConsoleConfig.belongOrgFlag || "custom" //belongOrgFlag: 所属单位标识,std:官方的组件(神州云动);custom:第三方的组件
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
// 服务名
|
|
175
|
+
let devSvcDispatch = this.options.devConsoleConfig.devSvcDispatch || '/devconsole'
|
|
176
|
+
let res = await post(`${this.options.devConsoleConfig.baseUrl}${devSvcDispatch}/custom/pc/1.0/post/insertCustomComp`,
|
|
175
177
|
body, header);
|
|
176
178
|
if (res.returnCode == 200) {
|
|
177
179
|
console.error(chalk.green(`发布成功!`));
|
package/src/publishProjectH5.js
CHANGED
|
@@ -112,7 +112,12 @@ class Publish {
|
|
|
112
112
|
console.log(chalk.green('开始编译,请稍后...'));
|
|
113
113
|
console.log();
|
|
114
114
|
let that = this;
|
|
115
|
-
|
|
115
|
+
// 当时mac系统时使用mac路径命令,当时window系统时,使用window命令路径
|
|
116
|
+
let path = "cli.exe"
|
|
117
|
+
if (process.platform === 'darwin') {
|
|
118
|
+
path = "/Applications/HBuilderX.app/Contents/MacOS/cli"
|
|
119
|
+
}
|
|
120
|
+
exec(`${path} publish --platform h5 --project ` + projectConfig.name, (error, stdout, stderr) => {
|
|
116
121
|
if (error) {
|
|
117
122
|
console.log('编译失败:', error);
|
|
118
123
|
console.log(chalk.red('编译失败:' + stdout));
|
package/utils/md2html.js
CHANGED
|
@@ -27,7 +27,7 @@ function watchFile(target) {
|
|
|
27
27
|
function change(target = "README", outPath = "dist", outFile = "README") {
|
|
28
28
|
//读取文件
|
|
29
29
|
const data = fs.readFileSync(target + ".md", 'utf-8')
|
|
30
|
-
const html = marked(data); //将md内容转为html内容
|
|
30
|
+
const html = marked.parse(data); //将md内容转为html内容
|
|
31
31
|
let template = createTemplate();
|
|
32
32
|
template = template.replace('{{{content}}}', html); //替换html内容占位标记
|
|
33
33
|
|