alexlamsl
c14ff76eed
move TTY workaround to CLI
2017-04-15 22:56:05 +08:00
alexlamsl
4da6b564db
allow literal string as souce map input on CLI
...
fixes #123
2017-04-15 19:01:53 +08:00
alexlamsl
169cb802a9
fix assignment to boolean
2017-04-15 17:23:39 +08:00
alexlamsl
9812cba843
add builtins & domprops
...
fixes #1368
2017-04-15 15:20:56 +08:00
alexlamsl
66cebbf336
implement --name-cache
2017-04-15 08:15:50 +08:00
alexlamsl
32561c1517
suppress warnings by default
2017-04-15 00:26:49 +08:00
alexlamsl
0792c77564
add warnings as toplevel shorthand
2017-04-14 23:51:09 +08:00
alexlamsl
e03c194beb
improve ease of use for --mangle except
2017-04-14 18:13:39 +08:00
alexlamsl
2af73232c7
add --source-map base
...
update documentation
2017-04-14 18:02:33 +08:00
alexlamsl
3d9e9a164d
utilise public API for streams
2017-04-14 17:18:59 +08:00
alexlamsl
177c9a09ed
add --mangle-props
2017-04-14 17:03:09 +08:00
alexlamsl
95e2ec803d
add --verbose
...
shortcut for `options.compress.warnings="verbose"`
2017-04-14 16:01:43 +08:00
alexlamsl
1a56c2f31d
unify CLI & API under minify()
...
- refactor `screw_ie8` to `ie8`
- compact `sourceMap` options
- more stringent verification on input `options`
- toplevel shorthands
- `ie8`
- `keep_fnames`
- `toplevel`
- deprecated `fromString` in `minify()`
- `minify()` no longer handles any `fs` operations
- unify order of operations for `mangle_properties()` on CLI & API
- `bin/uglifyjs` used to `mangle_properties()` before even `Compressor`
- `minify()` used to `mangle_properties()` after `Compressor` but before `mangle_names()`
- both will now do `Compressor`, `mangle_names()` then `mangle_properties()`
- `options.parse` / `--parse` for parser options beyond `bare_returns`
closes #96
closes #1366
fixes #124
fixes #263
fixes #379
fixes #423
fixes #576
fixes #737
fixes #958
fixes #1036
fixes #1175
fixes #1220
fixes #1223
fixes #1280
2017-04-14 08:34:46 +08:00
Alex Lam S.L
2244743545
convert AST_Seq from binary tree to array ( #1460 )
...
- rename `AST_Seq` to `AST_Sequence`
- raise default sequences_limit from 200 to 800
2017-04-12 21:56:27 +08:00
kzc
79334dda10
fix regression: CLI options with hyphens like -b ascii-only ( #1640 )
...
fixes #1637
2017-03-24 11:55:03 +08:00
Alex Lam S.L
1f0333e9f1
stay safe with constants in IE8- ( #1547 )
...
- `undefined` etc. can be redefined at top-level for IE8-, so disable related optimisations
- fixed `--support-ie8` catch mangle bug
2017-03-05 12:51:11 +08:00
Alex Lam S.L
ea9ab9fb0e
resolve issue with outdated version of async ( #1549 )
...
fixes #746
2017-03-05 01:54:20 +08:00
Alex Lam S.L
872270b149
improve error messages ( #1506 )
...
- better inheritance of `Error` sub-classes
- mark parse error against source in CLI
closes #235
closes #348
closes #524
closes #1356
closes #1405
2017-02-27 03:40:54 +08:00
Alex Lam S.L
cf0951f726
allow --in-source-map inline ( #1490 )
...
- limited to one input file (or `stdin`)
- only works with built-in parser
fixes #520
2017-02-25 04:11:21 +08:00
alexlamsl
8898b8a0fe
clean up max_line_len
...
- never exceed specified limit
- otherwise warning is shown
- enabled only for final output
closes #1496
2017-02-21 13:29:58 +08:00
Alex Lam S.L
1eaa211e09
fix mangling collision with keep_fnames ( #1431 )
...
* fix mangling collision with keep_fnames
fixes #1423
* pass mangle options to figure_out_scope()
bring command-line in line with minify()
2017-01-26 12:18:28 +01:00
kzc
ec2e5fa3a2
Have minify() and tests use figure_out_scope() as uglifyjs CLI does
...
Clarify docs, help and tests for --support-ie8 and screw_ie8=false
2017-01-19 17:14:33 +01:00
Ashley (Scirra)
2a9989dd18
Add --mangle-props-debug and fix --mangle-props=unquoted collision
...
Patch by @AshleyScirra
Based on: PR #1316
Renamed the CLI debug option to --mangle-props-debug
Fixes : #1321 name collision in --mangle-props=unquoted
2016-11-29 20:25:39 +01:00
Anthony Van de Gejuchte
8d74f34373
Don't filter shebangs when using the 'some' comment filter
...
Also clarify documentation a bit more about using regexp as filter
2016-10-23 21:31:03 +02:00
pengzhenqing
e51c6ba380
Add an option for writing inline source map
2016-10-23 21:21:39 +02:00
Richard van Velzen
e05510f3bc
Add an option to wrap IIFEs in parenthesis
...
For #1307 .
2016-10-06 14:11:32 +02:00
Anthony Van de Gejuchte
0111497fc9
Make all comment options in cli available in js api
...
Also removing more code within "loop" while at it.
2016-09-06 17:54:45 +02:00
kzc
72306b9885
Add simple file globbing to bin/uglifyjs for Windows
2016-08-14 21:46:38 +02:00
kzc
02c638209e
Enable --screw-ie8 by default.
...
catch identifier is mangled correctly for ES5 standards-compliant JS engines by default.
Unconditionally use the ie8 if/do-while workaround whether or not --screw-ie8 is enabled.
To support non-standard ie8 javascript use: uglifyjs --support-ie8
2016-06-30 21:49:48 +02:00
Shrey Banga
e645ba84cf
Respect quote style in object literals
...
The option added in fbbaa42ee5 wasn't
being respected inside object literals, so quoted property names would
still be stripped out with this option.
This is mostly a corner-case, but useful when the output is passed to
something like the Closure compiler, where quoted property names can be
used to prevent mangling.
2016-06-19 21:13:31 +02:00
kzc
c55dd5ed74
Add passes compress option. Fix duplicate compress warnings.
2016-04-19 20:05:33 +02:00
Richard van Velzen
bdd8e34f63
Allow --no-* options to disable their respective parameter
...
Fixes #974 and #972
2016-02-17 20:04:45 +01:00
Richard van Velzen
d5c651a5e5
Allow cli options to be specified in separate definitions
...
Fix for #963 . This allows stuff like `--define a=1 --define b=1` besides only `--define a=1,b=1`
2016-02-10 10:14:46 +01:00
Mihai Bazon
7691bebea5
Rework has_directive
...
It's now available during tree walking, i.e. walker.has_directive("use
asm"), rather than as part of the scope. It's thus no longer necessary
to call `figure_out_scope` before codegen. Added special bits in the
code generator to overcome the fact that it doesn't inherit from
TreeWalker.
Fix #861
2015-11-11 22:15:25 +02:00
kzc
83db98ad3b
Fixed RegExp literal in mozilla AST generation/output and added a --dump-spidermonkey-ast flag
2015-11-01 01:02:52 -04:00
Damian Krzeminski
d5138f7467
add --pure-funcs option
...
it has the same effect as specifying `pure_funcs` in `--compressor`
option, however it's much easier to use
instead of:
--compressor 'pure_func=["Math.floor","debug","console.logTime"]'
it's now possible:
--compressor --pure-funcs Math.floor debug console.logTime
fixes #684
2015-10-13 21:24:14 -04:00
kzc
6500f8c52c
get rid of SCOPE_IS_NEEDED as it was always true
2015-10-07 15:33:24 -04:00
kzc
4d2f7d83af
Fix handling of "use asm" when no command line flags are passed to uglifyjs. SCOPE_IS_NEEDED is unconditionally true now. Refactored floating point literal parsing to be more in keeping with the AST class design.
2015-10-07 13:10:53 -04:00
kzc
593677d2ff
Add proper support for "use asm"; blocks. Disable -c optimization within "use asm"; sections and preserve floating point literals in their original form. Non-asm.js sections are optimized as before. Asm.js sections can still be mangled and minified of whitespace. No special command line flags are required.
2015-10-07 10:00:28 +02:00
Mihai Bazon
99233c44cc
No longer use vm to load code.
...
Improves performance 2x on node > 0.10.
Ref #636
2015-09-24 17:58:51 +03:00
Joao Carlos
0b82e1cd5b
Change --mangle-regex to accept a full regex
2015-06-09 15:14:41 +03:00
Joao Carlos
9aef34a816
Show descriptive error when --mangle-regex is invalid
2015-06-09 14:31:49 +03:00
Joao Carlos
0ac6918a41
Add --mangle-regex option
2015-06-09 14:16:50 +03:00
Mihai Bazon
d2dda34b2a
Remove deprecated calls to utils.print/utils.error
...
Close #542 , #641 , #647
2015-05-04 15:07:16 +03:00
Mihai Bazon
7b22f2031f
If name_cache is specified, do rename cached properties
...
(even if --mangle-props is not there)
2015-04-22 17:34:49 +03:00
Mihai Bazon
5d60484553
More fixes for the breaking changes in yargs
...
Close #670
2015-04-05 13:20:22 +03:00
なつき
db396da734
Fix long options
2015-03-29 04:00:42 -07:00
Mihai Bazon
e1c3861832
Export readDefaultReservedFile
2015-03-22 11:04:28 +02:00
Mihai Bazon
03b6121194
Add --reserve-domprops along with a default exclusion list in tools/domprops.json
2015-03-18 12:10:21 +02:00
Mihai Bazon
3ef092332b
Support multiple --reserved-file args
2015-03-18 11:53:17 +02:00