Skip to content

Commit

Permalink
feat: show help when no options given
Browse files Browse the repository at this point in the history
  • Loading branch information
kingdaro committed Jan 26, 2018
1 parent 3aba841 commit a7ee15a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/webpack.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@
}
});

if (yargs.argv._.length === 0) {
yargs.showHelp();
return;
}

// yargs will terminate the process early when the user uses help or version.
// This causes large help outputs to be cut short (https://github.com/nodejs/node/wiki/API-changes-between-v0.10-and-v4#process).
// To prevent this we use the yargs.parse API and exit the process normally
Expand Down

0 comments on commit a7ee15a

Please sign in to comment.