Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed May 18, 2022
1 parent 3ebd611 commit 6760f57
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
17 changes: 11 additions & 6 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,11 +567,15 @@ let args = yargs
command: "build",
desc: "编译构造并最小化输出结果",
handler: (argv) => {
utils.verifyeeuiProject();
utils.verifyeeuiTemplate();
plugin.eeuiScript(null, true, () => {
buildApp.build(argv.s === true);
});
if (argv.sf === true) {
buildApp.syncFolderAndWebSocket(null, null, null, true);
} else {
utils.verifyeeuiProject();
utils.verifyeeuiTemplate();
plugin.eeuiScript(null, true, () => {
buildApp.build(argv.s === true);
});
}
}
})
.command({
Expand Down Expand Up @@ -608,7 +612,8 @@ let args = yargs
.alias({
"h": "help",
"v": "version",
"s": "simple"
"s": "simple",
"sf": "syncFolder",
})
.strict(true)
.argv;
Expand Down
20 changes: 13 additions & 7 deletions lib/builder/buildApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ module.exports = {
/**
* 打包build目录
*/
compressBuildDir() {
compressBuildDir(callback) {
let zipName = "build-" + utils.formatDate("YmdHis");
let expand = require("../utils/expand");
if (expand.androidGradle("versionName")) {
Expand All @@ -417,7 +417,7 @@ module.exports = {
type: 'dir',
path: path.resolve(config.distDir)
}]
});
}, callback);
},

/**
Expand Down Expand Up @@ -654,13 +654,19 @@ module.exports = {
this.completeCode(info.assetsByChunkName);
this.copyOtherFile(path.resolve(config.sourceDir), path.resolve(config.distDir), true);
this.appboardGulpBabel('appboard-build');
this.syncFolderAndWebSocket(null, null, null, true);
if (noZip !== true) {
this.compressBuildDir();
}
child_process.exec("eeui build --syncFolder", (error, stdout, stderr) => {
if (error) {
logger.fatal(error, stdout, stderr);
}
if (noZip !== true) {
this.compressBuildDir(process.exit);
} else {
process.exit()
}
})
}
};
fse.removeSync(path.resolve(config.distDir));
return new builder(`${config.sourceDir}/${config.sourcePagesDir}`, `${config.distDir}/${config.sourcePagesDir}`, options).build(buildCallback);
}
};
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"node-notifier": "^6.0.0",
"ora": "^4.0.3",
"plist": "^3.0.1",
"postcss": "^7.0.39",
"request": "^2.88.2",
"shelljs": "^0.8.3",
"sourcer": "^0.1.4",
Expand All @@ -63,7 +64,7 @@
"vue-loader": "^15.9.0",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.41.6",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.11",
"webpack-merge": "^4.2.2",
"weex-bindingx": "^0.0.49",
Expand Down

0 comments on commit 6760f57

Please sign in to comment.