Skip to content

Commit

Permalink
docs: fix mangle docs [skip ci]
Browse files Browse the repository at this point in the history
- Correct error in config with options (no double array)
 - Add default options in options list
  • Loading branch information
caesarsol authored and boopathi committed Jan 29, 2018
1 parent 71b0b88 commit 669e972
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/babel-plugin-minify-mangle-names/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ npm install babel-plugin-minify-mangle-names
```json
// with options
{
"plugins": ["minify-mangle-names", { "exclude": { "foo": true, "bar": true} }]
"plugins": [
["minify-mangle-names", { "exclude": { "foo": true, "bar": true} }]
]
}
```

Expand All @@ -70,8 +72,8 @@ require("babel-core").transform("code", {

## Options

+ `exclude` - A plain JS Object with keys as identifier names and values indicating whether to exclude
+ `eval` - mangle identifiers in scopes accessible by eval
+ `keepFnName` - prevent mangler from altering function names. Useful for code depending on `fn.name`
+ `topLevel` - mangle topLevel Identifiers
+ `keepClassName` - prevent mangler from altering class names.
+ `exclude` - A plain JS Object with keys as identifier names and values indicating whether to exclude (default: `{}`)
+ `eval` - mangle identifiers in scopes accessible by eval (default: `false`)
+ `keepFnName` - prevent mangler from altering function names. Useful for code depending on `fn.name` (default: `false`)
+ `topLevel` - mangle topLevel Identifiers (default: `false`)
+ `keepClassName` - prevent mangler from altering class names (default: `false`).

0 comments on commit 669e972

Please sign in to comment.