Add --define option and usage

This commit is contained in:
Jason Miller 2019-01-30 16:28:47 -05:00 committed by GitHub
parent b9d853eb50
commit 74fd71b6fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,8 @@ export default handler => {
.option('--external', `Specify external dependencies, or 'none'`)
.option('--globals', `Specify globals dependencies, or 'none'`)
.example('microbundle --globals react=React,jquery=$')
.option('--define', 'Replace constants with hard-coded values')
.example('microbundle --define API_KEY=1234')
.option('--compress', 'Compress output using Terser', null)
.option('--strict', 'Enforce undefined global context and add "use strict"')
.option('--name', 'Specify name exposed in UMD builds')