Age | Commit message (Expand) | Author |
2012-12-06 | Add proper parens in "NoIn" expressions....fix #60.
| Mihai Bazon |
2012-11-14 | Add support for somewhat preserving line numbers....Usage: uglifyjs2 -b "beautify=0,preserve_line=1" /path/to/js
ref #46
| Richard van Velzen |
2012-11-07 | fix another small regression...we do need parens here: `new (foo.bar().baz)`, but not here: `new foo.bar.baz`
| Mihai Bazon |
2012-11-07 | fix regression from 5346fb94 (shouldn't parenthesize i++ in x[i++]) | Mihai Bazon |
2012-11-07 | parenthesize property access when it's the expression in New...refs #35
| Mihai Bazon |
2012-11-07 | further fix for parens around New (refs #35) | Mihai Bazon |
2012-11-07 | parenthesize a Call expression when its parent is New...fix #35
| Mihai Bazon |
2012-11-07 | add proper parens around unary expressions...fix #34
| Mihai Bazon |
2012-11-05 | print final semicolon...close #28
| Mihai Bazon |
2012-10-22 | more sequence optimizations (lift some sequences above binary/unary expressio... | Mihai Bazon |
2012-10-17 | add `semicolons` option in the code generator (default: `true`)...pass `false` to separate statements with newlines instead of semicolons
| Mihai Bazon |
2012-10-16 | fix small glitches in source map generation | Mihai Bazon |
2012-10-13 | add parens to AST_Seq whose parent is AST_Unary | Mihai Bazon |
2012-10-09 | add AST_Infinity node | Mihai Bazon |
2012-10-09 | added $propdoc to AST nodes and some cleanups...hopefully we can make the AST documentation self-generating
| Mihai Bazon |
2012-10-08 | for 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-04 | minor | Mihai Bazon |
2012-10-03 | more cleanup (dropped AST_SwitchBlock) | Mihai Bazon |
2012-10-02 | support for `--comments` option to keep comments containing @license or @pres... | Mihai Bazon |
2012-10-02 | line numbers start at 1 | Mihai Bazon |
2012-10-02 | added option to keep some comments in the output | Mihai Bazon |
2012-10-02 | "use strict"; | Mihai Bazon |
2012-10-02 | a shy attempt to obey `width` in the beautifier; added `bracketize` option to... | Mihai Bazon |
2012-09-24 | Support 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 |
2012-09-21 | better support for multiple input files:...- use a single AST_Toplevel node for all files
- keep original source filename in the tokens
| Mihai Bazon |
2012-09-18 | support for directives | Mihai Bazon |
2012-09-18 | added AST_NaN (output as 0/0) | Mihai Bazon |
2012-09-16 | rewrite handle_if_return...optimizations of if/return/continue seem to be even better now
| Mihai Bazon |
2012-09-14 | adding an imaginary "return undefined" can sometimes help...function f() {
if (foo) return x();
if (!bar) return y();
}
==>
function f() {
return foo ? x() : bar ? void 0 : y();
}
| Mihai Bazon |
2012-09-14 | more optimizations that v1 does and some cleanups...- a = a + x ==> a+=x
- joining consecutive var statements (hoisting is not always desirable)
- x == false ==> x == 0, x != true ==> x != 1
- x, x ==> x; x = exp(), x ==> x = exp()
- discarding useless break-s
| Mihai Bazon |
2012-09-12 | fixed run-tests and an issue about reversing the condition in AST_If | Mihai Bazon |
2012-09-11 | fixed some mess with symbols/scope...- all symbols now have a `thedef` property which is a SymbolDef object,
instead of the `uniq` that we had before (pointing to the first occurrence
of the name as declaration).
- for undeclared symbols we still create a SymbolDef object in the toplevel
scope but mark it "undeclared"
- we can now call figure_out_scope after squeezing, which is useful in order
not to mangle names that were dropped by the squeezer
| Mihai Bazon |
2012-09-10 | more progress on the compressor (WIP) | Mihai Bazon |
2012-09-08 | fix output for division followed by regexp...( v1 report: https://github.com/mishoo/UglifyJS/pull/458 )
| Mihai Bazon |
2012-09-05 | cleaned up usage of AST_BlockStatement...The following nodes were instances of AST_BlockStatement: AST_Scope,
AST_SwitchBlock, AST_SwitchBranch. Also, AST_Try, AST_Catch, AST_Finally
were having a body instanceof AST_BlockStatement.
Overloading the meaning of AST_BlockStatement this way turned out to be a
mess; we now have an AST_Block class that is the base class for things
having a block of statements (might or might not be bracketed). The
`this.body` of AST_Scope, AST_Try, AST_Catch, AST_Finally is now an array of
statements (as they inherit from AST_Block).
Avoiding calling superclass's _walk function in walkers (turns out we walked
a node multiple times).
| Mihai Bazon |
2012-09-04 | if present, the `else` in an `if` should always be forced statement | Mihai Bazon |
2012-09-03 | jumps, try and definitions are statements too | Mihai Bazon |
2012-09-03 | an AST_If is too a StatementWithBody | Mihai Bazon |
2012-09-03 | a LabeledStatement should be in fact a StatementWithBody...This fixes output for:
if (foo) {
moo: if (bar) {
break moo;
}
} else {
baz();
}
(the labeled statement must be outputted inside brackets)
| Mihai Bazon |
2012-09-03 | switch branches must be declared `required` so that the compressor doesn't...replace nodes with a single statement.
looks stable for now, though mess begins to sink in. need to review the AST
hierarchy.
| Mihai Bazon |
2012-09-02 | add source mappings for more node types; started CLI utility | Mihai Bazon |
2012-08-29 | started support for generating source maps (WIP)...plugged in @fitzgen's source-map library
| Mihai Bazon |
2012-08-28 | fix output for arrays containing undefined values...[1,,2,] ==> [1,,2] instead of [1,undefined,2]
| Mihai Bazon |
2012-08-28 | fix code generator for this case:...if (foo) {
with (bar)
if (baz)
x();
} else y();
(the compressor removes the brackets since the consequent consists of a
single statement, but the codegen must include the brackets because
otherwise the `else` would refer to the inner `if`)
| Mihai Bazon |
2012-08-27 | update (c) years | Mihai Bazon |
2012-08-27 | added print_to_string helper method | Mihai Bazon |
2012-08-23 | fix current_col and force a newline every 32K (support options.max_line_len) | Mihai Bazon |
2012-08-22 | added license | Mihai Bazon |
2012-08-22 | fix output for certain edge cases...the statements if, for, do, while and with might have an AST_EmptyStatement
as body; if that's the case, we need to make sure that the semicolon gets in
the output.
| Mihai Bazon |
2012-08-22 | declare some properties in the node constructor so that they're copied in clone | Mihai Bazon |