Skip to content

Commit a7ee15a

Browse files
author
kingdaro
committed
feat: show help when no options given
1 parent 3aba841 commit a7ee15a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bin/webpack.js

100755100644
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@
196196
}
197197
});
198198

199+
if (yargs.argv._.length === 0) {
200+
yargs.showHelp();
201+
return;
202+
}
203+
199204
// yargs will terminate the process early when the user uses help or version.
200205
// This causes large help outputs to be cut short (https://github.com/nodejs/node/wiki/API-changes-between-v0.10-and-v4#process).
201206
// To prevent this we use the yargs.parse API and exit the process normally

0 commit comments

Comments
 (0)