remove deprecated hack

minor tweaks to docs
This commit is contained in:
alexlamsl 2017-04-15 20:46:57 +08:00
parent bf5502a9ce
commit bd116f128e
3 changed files with 2 additions and 4 deletions

View File

@ -856,7 +856,7 @@ which we care about here are `source_map` and `comments`.
In order to keep certain comments in the output you need to pass the In order to keep certain comments in the output you need to pass the
`comments` option. Pass a RegExp (as string starting and closing with `/` `comments` option. Pass a RegExp (as string starting and closing with `/`
or pass a RegExp object), a boolean or a function. Stringified options or pass a RegExp object), a boolean or a function. Stringified options
`all` and `some` can be passed too, where `some` behaves like it's cli `all` and `some` can be passed too, where `some` behaves like it's CLI
equivalent `--comments` without passing a value. If you pass a RegExp, equivalent `--comments` without passing a value. If you pass a RegExp,
only those comments whose body matches the RegExp will be kept. Note that body only those comments whose body matches the RegExp will be kept. Note that body
means without the initial `//` or `/*`. If you pass a function, it will be means without the initial `//` or `/*`. If you pass a function, it will be

View File

@ -689,7 +689,6 @@ function parse($TEXT, options) {
options = defaults(options, { options = defaults(options, {
bare_returns : false, bare_returns : false,
cli : false,
expression : false, expression : false,
filename : null, filename : null,
html5_comments : true, html5_comments : true,
@ -1502,7 +1501,6 @@ function parse($TEXT, options) {
}; };
function is_assignable(expr) { function is_assignable(expr) {
if (options.cli) return true;
return expr instanceof AST_PropAccess || expr instanceof AST_SymbolRef; return expr instanceof AST_PropAccess || expr instanceof AST_SymbolRef;
}; };

View File

@ -2,7 +2,7 @@
// derived from https://github.com/qfox/uglyfuzzer by Peter van der Zee // derived from https://github.com/qfox/uglyfuzzer by Peter van der Zee
"use strict"; "use strict";
// check both cli and file modes of nodejs (!). See #1695 for details. and the various settings of uglify. // check both CLI and file modes of nodejs (!). See #1695 for details. and the various settings of uglify.
// bin/uglifyjs s.js -c && bin/uglifyjs s.js -c passes=3 && bin/uglifyjs s.js -c passes=3 -m // bin/uglifyjs s.js -c && bin/uglifyjs s.js -c passes=3 && bin/uglifyjs s.js -c passes=3 -m
// cat s.js | node && node s.js && bin/uglifyjs s.js -c | node && bin/uglifyjs s.js -c passes=3 | node && bin/uglifyjs s.js -c passes=3 -m | node // cat s.js | node && node s.js && bin/uglifyjs s.js -c | node && bin/uglifyjs s.js -c passes=3 | node && bin/uglifyjs s.js -c passes=3 -m | node