Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix comments: true doc, add "@license" tip #462

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Expand Up @@ -81,13 +81,14 @@ The available options are:
-d, --define Global definitions [string]
-e, --enclose Embed everything in a big function, with a configurable
parameter/argument list. [string]
--comments Preserve copyright comments in the output. By default this
works like Google Closure, keeping JSDoc-style comments
that contain "@license" or "@preserve". You can optionally
--comments Preserve comments in the output. You can optionally
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
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
compression is on, because of dead code removal or
cascading statements into sequences. [string]
Expand Down