Skip to content

Commit

Permalink
Adds the --version description in the help section. Fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-vlc committed Sep 23, 2017
1 parent 2ec8019 commit 6205c51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Install the module with: `npm install uglifyjs-folder -g`
-y --harmony Uses uglify-js-harmony as a minifier
-p --pattern Specifies a comma separated glob patterns for the file selections. Default: **/*.js
--pseparator Specifies the separator for the pattern input. Default: ,
--version Prints the current version from package.json
-h --help Print this list and exit.
## Examples
$ uglifyjs-folder test-folder
Expand Down
4 changes: 2 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ var cli = meow({
' -y --harmony Uses uglify-js-harmony as a minifier',
' -p --pattern Specifies a comma separated glob patterns for the file selections. Default: **/*.js',
' --pseparator Specifies the separator for the pattern input. Default: ,',
' --version Prints the current version from package.json',
' -h --help Print this list and exit.'
].join('\n')
});


var result = uglifyFolder(cli.input[0], {
comments: cli.flags.comments || cli.flags.c || false,
output: cli.flags.output || cli.flags.o,
Expand All @@ -31,7 +31,7 @@ var result = uglifyFolder(cli.input[0], {
patterns: (cli.flags.pattern || cli.flags.p || "**/*.js").split(cli.flags.pseparator || ',')
});

if(result) {
if (result) {
console.log(result);
}

Expand Down

0 comments on commit 6205c51

Please sign in to comment.