This commit is contained in:
Tom Byrer 2015-01-09 14:52:37 +00:00
commit 8003b8938d

View File

@ -86,13 +86,14 @@ The available options are:
-d, --define Global definitions [string] -d, --define Global definitions [string]
-e, --enclose Embed everything in a big function, with a configurable -e, --enclose Embed everything in a big function, with a configurable
parameter/argument list. [string] parameter/argument list. [string]
--comments Preserve copyright comments in the output. By default this --comments Preserve comments in the output. You can optionally
works like Google Closure, keeping JSDoc-style comments
that contain "@license" or "@preserve". You can optionally
pass one of the following arguments to this flag: pass one of the following arguments to this flag:
- "all" to keep all comments - "all" or "true" to keep all comments
- a valid JS regexp (needs to start with a slash) to keep - a valid JS regexp (needs to start with a slash) to keep
only comments that match. only comments that match.
For example, to keep JSDoc-style comments that contain
"@license" or "@preserve", use this option:
`comments: /@[Ll]icen[sc]e|@[Pp]reserve/`
Note that currently not *all* comments can be kept when Note that currently not *all* comments can be kept when
compression is on, because of dead code removal or compression is on, because of dead code removal or
cascading statements into sequences. [string] cascading statements into sequences. [string]