Add option to preserve/enforce string quote style
authorMihai Bazon <mihai.bazon@gmail.com>
Tue, 27 Jan 2015 20:26:27 +0000 (22:26 +0200)
committerMihai Bazon <mihai.bazon@gmail.com>
Tue, 27 Jan 2015 20:26:27 +0000 (22:26 +0200)
commitfbbaa42ee55a7f753f7cab9b1a905ccf73cf26d5
tree6db252b7cc4acb1835b6bf9644890a6f275cbf91
parent099992ecae5ed51332f3928b9e1c06e7ad8147b8
Add option to preserve/enforce string quote style

`-q 0` (default) use single or double quotes such as to minimize the number of
 bytes (prefers double quotes when both will do); this is the previous
 behavior.

`-q 1` -- always use single quotes

`-q 2` -- always use double quotes

`-q 3` or just `-q` -- always use the original quotes.

Related codegen option: `quote_style`.

Close #495
Close #460

Some `yargs` guru please tell me why `uglifyjs --help` doesn't display the
help string for `-q` / `--quotes`, and why it doesn't output the expected
argument types anymore, like good old `optimist` did.
README.md
bin/uglifyjs
lib/ast.js
lib/output.js
lib/parse.js