From 9819e61e658ff4fdc0650bce86507ba4f6e1eee6 Mon Sep 17 00:00:00 2001 From: tomByrer Date: Thu, 3 Apr 2014 18:08:07 -0600 Subject: [PATCH 1/3] fix comments: true doc, add "@license" tip The doc was misleading, & [I'm not the only one](https://github.com/mishoo/UglifyJS2/issues/82) who believes so. --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 27d06cd6..00ed647b 100644 --- a/README.md +++ b/README.md @@ -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: /@license|@preserve/` Note that currently not *all* comments can be kept when compression is on, because of dead code removal or cascading statements into sequences. [string] From fa4914b17b55c8d381d1d46c44ceaa1d04ae6c23 Mon Sep 17 00:00:00 2001 From: tomByrer Date: Thu, 10 Apr 2014 14:08:07 -0600 Subject: [PATCH 2/3] updated Brittish "licenCe http://www.bbc.co.uk/opensource/faq.shtml#q9 http://www.grammar-monster.com/easily_confused/licence_license.htm --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00ed647b..ddc7992f 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ The available options are: only comments that match. For example, to keep JSDoc-style comments that contain "@license" or "@preserve", use this option: - `comments: /@license|@preserve/` + `comments: /@license|@licence|@preserve/` Note that currently not *all* comments can be kept when compression is on, because of dead code removal or cascading statements into sequences. [string] From 391b9e750e7b27c3b933260d2f4bd176753a8a73 Mon Sep 17 00:00:00 2001 From: tomByrer Date: Sun, 20 Apr 2014 13:17:06 -0600 Subject: [PATCH 3/3] fix uppercase License Preserve --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ddc7992f..ab7aefd9 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ The available options are: only comments that match. For example, to keep JSDoc-style comments that contain "@license" or "@preserve", use this option: - `comments: /@license|@licence|@preserve/` + `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]