Skip to content

Commit

Permalink
feat: build 命令支持 -d 参数
Browse files Browse the repository at this point in the history
  • Loading branch information
gflizhiwen committed Jun 5, 2020
1 parent 1a15c37 commit 1cbc203
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/nodeppt/bin/nodeppt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ program
program
.command('build [entry]')
.option('-m, --map', 'Release sourcemap')
.option('-d, --dest <dir>', 'output directory')
.description('build html file')
.action((entry, cmd) => {
require('nodeppt-serve').build(entry, cleanArgs(cmd));
Expand Down Expand Up @@ -97,7 +98,7 @@ if (!program.args[0] && process.argv[2] !== 'new') {

function cleanArgs(cmd) {
const args = {version: packageJson.version};
cmd.options.forEach(o => {
cmd.options.forEach((o) => {
const key = o.long.replace(/^--/, '');
// if an option is not present and Command has a method with the same name
// it should not be copied
Expand Down

0 comments on commit 1cbc203

Please sign in to comment.