aboutsummaryrefslogtreecommitdiff
path: root/bin/uglifyjs
diff options
context:
space:
mode:
authoralexlamsl <alexlamsl@gmail.com>2017-02-18 22:44:53 +0800
committeralexlamsl <alexlamsl@gmail.com>2017-02-21 13:29:58 +0800
commit8898b8a0fe87f71c0ea2d35face6dfbf11db27ec (patch)
treeae7d8f66a4787a82b2b385ef179d95405d6e65db /bin/uglifyjs
parentec64acd2c8d8573abd5b77f8f8946767444841bb (diff)
downloadtracifyjs-8898b8a0fe87f71c0ea2d35face6dfbf11db27ec.tar.gz
tracifyjs-8898b8a0fe87f71c0ea2d35face6dfbf11db27ec.zip
clean up `max_line_len`
- never exceed specified limit - otherwise warning is shown - enabled only for final output closes #1496
Diffstat (limited to 'bin/uglifyjs')
-rwxr-xr-xbin/uglifyjs11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs
index 8cb2f0df..27717fb6 100755
--- a/bin/uglifyjs
+++ b/bin/uglifyjs
@@ -228,9 +228,10 @@ if (ARGS.mangle_props === true) {
}
var OUTPUT_OPTIONS = {
- beautify : BEAUTIFY ? true : false,
- preamble : ARGS.preamble || null,
- quote_style : ARGS.quotes != null ? ARGS.quotes : 0
+ beautify : BEAUTIFY ? true : false,
+ max_line_len : 32000,
+ preamble : ARGS.preamble || null,
+ quote_style : ARGS.quotes != null ? ARGS.quotes : 0,
};
if (ARGS.mangle_props == 2) {
@@ -540,7 +541,7 @@ function getOptions(flag, constants) {
ast.walk(new UglifyJS.TreeWalker(function(node){
if (node instanceof UglifyJS.AST_Seq) return; // descend
if (node instanceof UglifyJS.AST_Assign) {
- var name = node.left.print_to_string({ beautify: false }).replace(/-/g, "_");
+ var name = node.left.print_to_string().replace(/-/g, "_");
var value = node.right;
if (constants)
value = new Function("return (" + value.print_to_string() + ")")();
@@ -548,7 +549,7 @@ function getOptions(flag, constants) {
return true; // no descend
}
if (node instanceof UglifyJS.AST_Symbol || node instanceof UglifyJS.AST_Binary) {
- var name = node.print_to_string({ beautify: false }).replace(/-/g, "_");
+ var name = node.print_to_string().replace(/-/g, "_");
ret[name] = true;
return true; // no descend
}