aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-10-15 22:33:55 +0800
committerGitHub <noreply@github.com>2017-10-15 22:33:55 +0800
commitec598c351b25788334efb1fb35415c53eb0414e0 (patch)
tree472a2bde5ef4e324e4189dd875b0a1bcfdbe84c6 /README.md
parenteba0f93bc025383379a8959368ca273aa562bdae (diff)
downloadtracifyjs-ec598c351b25788334efb1fb35415c53eb0414e0.tar.gz
tracifyjs-ec598c351b25788334efb1fb35415c53eb0414e0.zip
fix-ups for #2356 (#2360)
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 7 insertions, 8 deletions
diff --git a/README.md b/README.md
index b57056ee..64bbafc4 100644
--- a/README.md
+++ b/README.md
@@ -508,6 +508,9 @@ if (result.error) throw result.error;
- `ie8` (default `false`) - set to `true` to support IE8.
+- `keep_fnames` (default: `false`) - pass `true` to prevent discarding or mangling
+ of function names. Useful for code relying on `Function.prototype.name`.
+
## Minify options structure
```javascript
@@ -625,6 +628,8 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `expression` (default: `false`) -- default `false`. Pass `true` to preserve completion values
from terminal statements without `return`, e.g. in bookmarklets.
+- `global_defs` (default: `{}`) -- see [conditional compilation](#conditional-compilation)
+
- `hoist_funs` (default: `true`) -- hoist function declarations
- `hoist_vars` (default: `false`) -- hoist `var` declarations (this is `false`
@@ -640,10 +645,6 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
compressor from discarding unused function arguments. You need this
for code which relies on `Function.length`.
-- `keep_fnames` (default: `false`) -- default `false`. Pass `true` to prevent the
- compressor from discarding function names. Useful for code relying on
- `Function.prototype.name`. See also: the `keep_fnames` [mangle option](#mangle).
-
- `keep_infinity` (default: `false`) -- default `false`. Pass `true` to prevent `Infinity` from
being compressed into `1/0`, which may cause performance issues on Chrome.
@@ -695,6 +696,8 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For
example: `/*@__PURE__*/foo();`
+- `switches` (default: `true`) -- de-duplicate and remove unreachable `switch` branches
+
- `toplevel` (default: `false`) -- drop unreferenced functions (`"funcs"`) and/or variables (`"vars"`)
in the top level scope (`false` by default, `true` to drop both unreferenced
functions and variables)
@@ -741,10 +744,6 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `toplevel` (default `false`). Pass `true` to mangle names declared in the
top level scope.
-- `keep_fnames` (default `false`). Pass `true` to not mangle function names.
- Useful for code relying on `Function.prototype.name`. See also: the `keep_fnames`
- [compress option](#compress-options).
-
- `eval` (default `false`). Pass `true` to mangle names visible in scopes
where `eval` or `with` are used.