-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
148 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
import program from 'commander'; | ||
import compile from '../compile'; | ||
|
||
program | ||
.option('-f, --file <file>', '待编译wpy文件') | ||
.option('-s, --source <source>', '源码目录') | ||
.option('-t, --target <target>', '生成代码目录') | ||
.option('-o, --output <type>', '编译类型:web,weapp。默认为weapp') | ||
.option('-p, --platform <type>', '编译平台:browser, wechat,qq。默认为browser') | ||
.option('-w, --watch', '监听文件改动') | ||
.option('--no-cache', '对于引用到的文件,即使无改动也会再次编译') | ||
.parse(process.argv); | ||
exports = module.exports = (program) => { | ||
|
||
if (compile.init(program)) { | ||
compile.build(program); | ||
} | ||
|
||
if (compile.init(program)) { | ||
compile.build(program); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters