Skip to content

CLI minify option#24

Open
bootleq wants to merge 5 commits intomrcoles:masterfrom
bootleq:minify-options
Open

CLI minify option#24
bootleq wants to merge 5 commits intomrcoles:masterfrom
bootleq:minify-options

Conversation

@bootleq
Copy link

@bootleq bootleq commented Dec 11, 2022

For #23

Add --modify (or -m) option to CLI script.

Usage example:

bookmarklet SOURCE.js -m '{parse:{bare_returns:true},compress:false,mangle:false}'

With command:

    npm add yargs
This also have a good side effect that unknown options like `--foo` will
no longer be treated as `source`.
Examples:

    ./bin/cli.js -m '{"compress":false}' SOURCE

    ./bin/cli.js SOURCE -m '{"parse":{"bare_returns":true}}'

Options reference:
https://github.com/terser/terser#minify-options
To make CLI usage a bit easier.
- uglify has already replaced by terser.

- Update default help to latest content.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant