Skip to content

Commit

Permalink
docs: Update CLI help menu --compress info
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Mar 24, 2022
1 parent 581989f commit 55b4767
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/prog.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default handler => {

opts.entries = toArray(str || opts.entry).concat(opts._);

if (opts.compress != null) {
if (typeof opts.compress !== 'undefined') {
// Convert `--compress true/false/1/0` to booleans:
if (typeof opts.compress !== 'boolean') {
opts.compress = opts.compress !== 'false' && opts.compress !== '0';
Expand Down Expand Up @@ -51,7 +51,11 @@ export default handler => {
.example('--define API_KEY=1234')
.option('--alias', `Map imports to different modules`)
.example('--alias react=preact')
.option('--compress', 'Compress output using Terser', null)
.option(
'--compress',
'Compress output using Terser (default true when --target is web, false when --target is node)',
)
.example('build --target web --no-compress')
.option('--strict', 'Enforce undefined global context and add "use strict"')
.option('--name', 'Specify name exposed in UMD builds')
.option('--cwd', 'Use an alternative working directory', '.')
Expand Down

0 comments on commit 55b4767

Please sign in to comment.