Commit e01e526f authored by rockyl's avatar rockyl

修改compile:单次编译项目,dev:实时编译项目,build:发布构建项目

parent 54e55b3c
......@@ -8,8 +8,8 @@ program
.command('init [name]', 'Initialize a project with template').alias('i')
.command('mock', 'Mock server').alias('m')
.command('serve', 'Http server').alias('s')
.command('build', 'Build project').alias('b')
.command('compile', 'Compile project').alias('c')
.command('dev', 'Build project automatic').alias('d')
.command('publish', 'Publish project').alias('p')
.command('build', 'Publish project').alias('b')
.command('upload', 'Upload project to oss').alias('u')
.parse(process.argv);
const program = require('commander');
const {exit, executeBuildProcess} = require('./tools');
const {exit, executeBuildProcess, updateProjectConfig} = require('./tools');
program
.option('-w, --watch', 'Watch file changing')
.option('-u, --upload-auto', 'Auto upload after publish success', false)
.parse(process.argv);
async function execute() {
await executeBuildProcess('build');
const version = await executeBuildProcess('build');
//console.log('detected version:', version);
updateProjectConfig('version', version);
if(program.uploadAuto){
console.log('\nAuto uploading...');
require('./game-cli-upload');
}
}
execute().catch(e => {
......
const program = require('commander');
const {exit, executeBuildProcess} = require('./tools');
program
.parse(process.argv);
async function execute() {
await executeBuildProcess('compile');
}
execute().catch(e => {
exit(e);
});
const program = require('commander');
const {exit, executeBuildProcess} = require('./tools');
program
.parse(process.argv);
async function execute() {
await executeBuildProcess('dev');
}
execute().catch(e => {
exit(e);
});
const program = require('commander');
const {exit, executeBuildProcess, updateProjectConfig} = require('./tools');
program
.option('-u, --upload-auto', 'Auto upload after publish success', false)
.parse(process.argv);
async function execute() {
const version = await executeBuildProcess('publish');
//console.log('detected version:', version);
updateProjectConfig('version', version);
if(program.uploadAuto){
console.log('\nAuto uploading...');
require('./game-cli-upload');
}
}
execute().catch(e => {
exit(e);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment