Skip to content

Commit

Permalink
feat: more cli flags
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed May 9, 2020
1 parent 4cd6a1e commit b8289f9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ const cli = cac('tsup')

cli
.command('<...files>', 'Entry files')
.option('--format <format>', 'Bundle format')
.option('--out-dir', 'Output directory', { default: 'dist' })
.option('--format <format>', 'Bundle format, "cjs" or "iife"', {
default: 'cjs',
})
.option('--minify', 'Minify bundle')
.option('--target <target>', 'Bundle target, "es20XX" or "esnext"', {
default: 'es2017',
Expand All @@ -25,8 +28,8 @@ cli
],
})
await result.write({
dir: 'dist',
format: options.format || 'cjs',
dir: options.outDir,
format: options.format,
})
})

Expand Down

0 comments on commit b8289f9

Please sign in to comment.