aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAshley (Scirra) <ashley@scirra.com>2016-10-27 11:23:04 -0400
committerRichard van Velzen <rvanvelzen1@gmail.com>2016-11-29 20:25:39 +0100
commit2a9989dd18c01081c486fe9089e3bb64079c773b (patch)
treebe59842ce6761ae625bd9a0d7f79b88c6f38ae2b /README.md
parent79b98a9fe87f950607c601a45a3566a46c32f425 (diff)
downloadtracifyjs-2a9989dd18c01081c486fe9089e3bb64079c773b.tar.gz
tracifyjs-2a9989dd18c01081c486fe9089e3bb64079c773b.zip
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
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 789219dc..6e9e5f2f 100644
--- a/README.md
+++ b/README.md
@@ -285,6 +285,21 @@ of mangled property names.
Using the name cache is not necessary if you compress all your files in a
single call to UglifyJS.
+#### Debugging property name mangling
+
+You can also pass `--mangle-props-debug` in order to mangle property names
+without completely obscuring them. For example the property `o.foo`
+would mangle to `o._$foo$_` with this option. This allows property mangling
+of a large codebase while still being able to debug the code and identify
+where mangling is breaking things.
+
+You can also pass a custom suffix using `--mangle-props-debug=XYZ`. This would then
+mangle `o.foo` to `o._$foo$XYZ_`. You can change this each time you compile a
+script to identify how a property got mangled. One technique is to pass a
+random number on every compile to simulate mangling changing with different
+inputs (e.g. as you update the input script with new properties), and to help
+identify mistakes like writing mangled keys to storage.
+
## Compressor options
You need to pass `--compress` (`-c`) to enable the compressor. Optionally
@@ -749,6 +764,7 @@ Other options:
- `regex` — Pass a RegExp to only mangle certain names (maps to the `--mangle-regex` CLI arguments option)
- `ignore_quoted` – Only mangle unquoted property names (maps to the `--mangle-props 2` CLI arguments option)
+ - `debug` – Mangle names with the original name still present (maps to the `--mangle-props-debug` CLI arguments option). Defaults to `false`. Pass an empty string to enable, or a non-empty string to set the suffix.
We could add more options to `UglifyJS.minify` — if you need additional
functionality please suggest!
d warsow-qfusion....Pierre Neidhardt 2020-05-02Revert "gnu: Add warsow-qfusion."...Marius Bakke 2020-05-02gnu: Add warsow-qfusion....Pierre Neidhardt 2020-04-30Merge branch 'master' into core-updates...Marius Bakke 2020-04-26gnu: guile3.0-chickadee: Rename to guile3.0-chickadee....Christopher Baines 2020-03-18Merge branch 'master' into core-updatesMarius Bakke 2020-03-18gnu: godot: Update to 3.2.1....Tobias Geerinckx-Rice 2020-03-14gnu: Add guile3.0-chickadee....Ricardo Wurmus 2020-03-10Merge branch 'master' into core-updatesMarius Bakke 2020-03-10gnu: ode: Use HTTPS home page....Tobias Geerinckx-Rice 2020-03-04Merge branch 'master' into core-updatesMarius Bakke 2020-03-01gnu: ode: Update to 0.16.1....Nicolas Goaziou 2020-02-24gnu: Add libtcod....Giacomo Leidi 2020-02-18gnu: Add surgescript....Timotej Lazar