aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
AgeCommit message (Expand)Author
2013-10-30Workaround for Safari bug...Close #313 Mihai Bazon
2013-10-30Fix parsing setters/getters (allow keywords for name)....The "key" property was always "set" or "get", which didn't make much sense. Now it'll be the actual name of the setter/getter (AST_Node), and the AST_Accessor object itself, which represents the function, won't store any name. Close #319 Mihai Bazon
2013-10-30Fix output for `x = 2 * (a % b / b * c)`...(issue #337) Mihai Bazon
2013-10-29Add "preamble" output option...Close #335 Mihai Bazon
2013-10-28Fix codegen for when comments_before is undefined....Fix #333 Mihai Bazon
2013-09-06Avoid printing <!-- in the output (HTML5 comment)Mihai Bazon
2013-09-06Support HTML5 comment syntax (enabled by default!)...See http://javascript.spec.whatwg.org/#comment-syntax https://github.com/mishoo/UglifyJS/issues/503 https://github.com/marijnh/acorn/issues/62 Mihai Bazon
2013-08-20Move support for `negate_iife` in the compressor, rather than code generator...(the code generator doesn't maintain enough context to know whether the return value is important or discarded) Fixes #272 Mihai Bazon
2013-08-18fixes #259: don't unnecessarily quote object properties when --screw-ie8Michael Ficarra
2013-07-18Fix output for arrays whose last element is a hole: [1,,]...1529ab96 started to do this (by considering holes to be separate from "undefined") but it still converted [1,,] (length 2, last element hole, trailing comma) to [1,] (length 1, trailing comma) Unfortunately the test suite doesn't really make this clear: the new test here passes with or without this patch because run-tests.js beautifys the expected output (in "make_code"), which does the incorrect transformation! If you make some manual change to arrays.js to make the test fail and see the INPUT and OUTPUT, then you can see that without this fix, [1,,] -> [1,], and with this fix it stays [1,,]. David Glasser
2013-06-03Escape null characters as \x00...Since \0 might be mistakenly interpreted as octal if followed by a number and using literal null is in some cases interpreted as end of string, escape null as \x00.Ville Lautanala
2013-05-22Add `negate_iife` option to the code generator....See discussion in a9511dfbe5c0d96d8cacb87582aa9a19737bbb98 Mihai Bazon
2013-05-20Fix output of statement: `new function(){...};`...Close #209 Mihai Bazon
2013-05-09Use the negation hack rather than parens for a toplevel function expression call...(only in !beautify mode) Mihai Bazon
2013-03-31Quote objects with numeric keysVladimir Zhuravlev
2013-03-31Don't use \xYY for identifiers...Fix #173 Mihai Bazon
2013-03-31Output, to_ascii: Escape non-ascii chars with \xnn instead of \unnnn whenever...Andreas Lind Petersen
2013-02-06Force space after literal regexp when used in "instanceof" or "in"...Close #118 Mihai Bazon
2013-02-06Fix parens for NaN...Close #116 Mihai Bazon
2013-02-06Fix parens for negative numbers...Close #115 Mihai Bazon
2013-02-06Fix parens for AST_New...Close #114 Mihai Bazon
2013-02-05Ugly hack to print comments before return/throw statements...Close #112 Mihai Bazon
2013-01-17[AST_Hole] the print function can be a no-op.Mihai Bazon
2013-01-17Fix output for arrays containing undefined values....1b6bcca7 was a first attempt at this. That commit made Uglify stop replacing holes with undefined, but instead it started replacing undefined with holes. This is slightly problematic, because there is a difference between a hole and an undefined value. More problematically, it changed [1,undefined] to [1,] which generally doesn't even parse as a hole (just as a trailing comma), so it didn't even preserve the length of the array! Instead, parse holes as their own special AST node which prints invisibly. David Glasser
2012-12-21Fix output when semicolons is off....(need to force a semicolon for the empty body of an `if`) Close #72 Mihai Bazon
2012-12-12Small cleanupMihai Bazon
2012-12-06Add proper parens in "NoIn" expressions....fix #60. Mihai Bazon
2012-11-14Add support for somewhat preserving line numbers....Usage: uglifyjs2 -b "beautify=0,preserve_line=1" /path/to/js ref #46 Richard van Velzen
2012-11-07fix another small regression...we do need parens here: `new (foo.bar().baz)`, but not here: `new foo.bar.baz` Mihai Bazon
2012-11-07fix regression from 5346fb94 (shouldn't parenthesize i++ in x[i++])Mihai Bazon
2012-11-07parenthesize property access when it's the expression in New...refs #35 Mihai Bazon
2012-11-07further fix for parens around New (refs #35)Mihai Bazon
2012-11-07parenthesize a Call expression when its parent is New...fix #35 Mihai Bazon
2012-11-07add proper parens around unary expressions...fix #34 Mihai Bazon
2012-11-05print final semicolon...close #28 Mihai Bazon
2012-10-22more sequence optimizations (lift some sequences above binary/unary expressio...Mihai Bazon
2012-10-17add `semicolons` option in the code generator (default: `true`)...pass `false` to separate statements with newlines instead of semicolons Mihai Bazon
2012-10-16fix small glitches in source map generationMihai Bazon
2012-10-13add parens to AST_Seq whose parent is AST_UnaryMihai Bazon
2012-10-09add AST_Infinity nodeMihai Bazon
2012-10-09added $propdoc to AST nodes and some cleanups...hopefully we can make the AST documentation self-generating Mihai Bazon
2012-10-08for certain nodes that we invent we might not have a original source file to...map from, so just use "?". and in any case, don't fail hard when addMapping throws. Mihai Bazon
2012-10-04minorMihai Bazon
2012-10-03more cleanup (dropped AST_SwitchBlock)Mihai Bazon
2012-10-02support for `--comments` option to keep comments containing @license or @pres...Mihai Bazon
2012-10-02line numbers start at 1Mihai Bazon
2012-10-02added option to keep some comments in the outputMihai Bazon
2012-10-02"use strict";Mihai Bazon
2012-10-02a shy attempt to obey `width` in the beautifier; added `bracketize` option to...Mihai Bazon
2012-09-24Support input source map...This is useful while compressing generated code; for example compressing JS compiled by CoffeeScript (assuming you got a source map): uglifyjs2 --in-source-map generated.js.map \ --source-map uglified.js.map \ -o uglified.js The above assumes you have a "generated.js.map" file which is the source mapping between your CoffeeScript and the generated.js (compiled output from CoffeeScript). The name of the input file is not present in this example; it will be fetched from the source map (but it can be passed manually too). The output will be in "uglified.js" and the output map "uglified.js.map" will actually map to the original CoffeeScript code, rather than to generated.js. Mihai Bazon