{"name":"babel-preset-minify","version":"0.5.0-alpha.34c3efe9","description":"Babel preset for all minify plugins.","keywords":["babel-minify","babel-preset","minify"],"homepage":"https://github.com/babel/minify#readme","bugs":{"url":"https://github.com/babel/minify/issues"},"license":"MIT","author":{"name":"amasad"},"main":"lib/index.js","repository":{"type":"git","url":"https://github.com/babel/minify/tree/master/packages/babel-preset-minify"},"dependencies":{"babel-plugin-minify-builtins":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-constant-folding":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-dead-code-elimination":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-flip-comparisons":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-guarded-expressions":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-infinity":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-mangle-names":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-numeric-literals":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-replace":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-simplify":"^0.5.0-alpha.34c3efe9","babel-plugin-minify-type-constructors":"^0.5.0-alpha.34c3efe9","babel-plugin-transform-inline-consecutive-adds":"^0.5.0-alpha.34c3efe9","babel-plugin-transform-member-expression-literals":"^6.10.0-alpha.34c3efe9","babel-plugin-transform-merge-sibling-variables":"^6.10.0-alpha.34c3efe9","babel-plugin-transform-minify-booleans":"^6.10.0-alpha.34c3efe9","babel-plugin-transform-property-literals":"^6.10.0-alpha.34c3efe9","babel-plugin-transform-regexp-constructors":"^0.5.0-alpha.34c3efe9","babel-plugin-transform-remove-console":"^6.10.0-alpha.34c3efe9","babel-plugin-transform-remove-debugger":"^6.10.0-alpha.34c3efe9","babel-plugin-transform-remove-undefined":"^0.5.0-alpha.34c3efe9","babel-plugin-transform-simplify-comparison-operators":"^6.10.0-alpha.34c3efe9","babel-plugin-transform-undefined-to-void":"^6.10.0-alpha.34c3efe9","lodash.isplainobject":"^4.0.6"},"readmeFilename":"README.md","readme":"# babel-preset-minify\n\nBabel preset for all minify plugins.\n\n+ [Install](#install)\n+ [Usage](#usage)\n+ [Options](#options)\n\n## Install\n\n```sh\nnpm install --save-dev babel-preset-minify\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n{\n  \"presets\": [\"minify\"]\n}\n```\n\nor pass in options -\n\n```json\n{\n  \"presets\": [[\"minify\", {\n    \"mangle\": {\n      \"exclude\": [\"MyCustomError\"]\n    },\n    \"unsafe\": {\n      \"typeConstructors\": false\n    },\n    \"keepFnName\": true\n  }]]\n}\n```\n\n### Via CLI\n\n```sh\nbabel script.js --presets minify\n```\n\n### Via Node API\n\n```javascript\nrequire(\"@babel/core\").transform(\"code\", {\n  presets: [\"minify\"]\n});\n```\n\n## Options\n\nTwo types of options:\n\n1. 1-1 mapping with plugin\n2. The same option passed to multiple plugins\n\n#### 1-1 mapping with plugin\n\n+ `false` - disable plugin\n+ `true` - enable plugin\n+ `{ ...pluginOpts }` - enable plugin and pass pluginOpts to plugin\n\nOptionName          | Plugin                                                         | DefaultValue\n----------          | ------                                                         | ------------\nbooleans            | [transform-minify-booleans][booleans]                          | true\nbuiltIns            | [minify-builtins][builtIns]                                    | true\nconsecutiveAdds     | [transform-inline-consecutive-adds][consecutiveAdds]           | true\ndeadcode            | [minify-dead-code-elimination][deadcode]                       | true\nevaluate            | [minify-constant-folding][evaluate]                            | true\nflipComparisons     | [minify-flip-comparisons][flipComparisons]                     | true\nguards              | [minify-guarded-expressions][guards]                           | true\ninfinity            | [minify-infinity][infinity]                                    | true\nmangle              | [minify-mangle-names][mangle]                                  | true\nmemberExpressions   | [transform-member-expression-literals][memberExpressions]      | true\nmergeVars           | [transform-merge-sibling-variables][mergeVars]                 | true\nnumericLiterals     | [minify-numeric-literals][numericLiterals]                     | true\npropertyLiterals    | [transform-property-literals][propertyLiterals]                | true\nregexpConstructors  | [transform-regexp-constructors][regexpConstructors]            | true\nremoveConsole       | [transform-remove-console][removeConsole]                      | false\nremoveDebugger      | [transform-remove-debugger][removeDebugger]                    | false\nremoveUndefined     | [transform-remove-undefined][removeUndefined]                  | true\nreplace             | [minify-replace][replace]                                      | true\nsimplify            | [minify-simplify][simplify]                                    | true\nsimplifyComparisons | [transform-simplify-comparison-operators][simplifyComparisons] | true\ntypeConstructors    | [minify-type-constructors][typeConstructors]                   | true\nundefinedToVoid     | [transform-undefined-to-void][undefinedToVoid]                 | true\n\n#### The same option passed to multiple plugins\n\n+ When multiple plugins require the same option, it's easier to declare it in one place. These options are passed on to two or more plugins.\n\nOptionName          | Plugins\n----------          | -------\nkeepFnName          | Passed to [mangle][mangle] & [deadcode][deadcode]\nkeepClassName       | Passed to [mangle][mangle] & [deadcode][deadcode]\ntdz                 | Passed to [builtIns][builtIns], [evaluate][evaluate], [deadcode][deadcode], [removeUndefined][removeUndefined]\n\n**Examples**\n\n```json\n{\n  \"presets\": [[\"minify\", {\n    \"evaluate\": false,\n    \"mangle\": true\n  }]]\n}\n```\n\n```json\n{\n  \"presets\": [[\"minify\", {\n    \"mangle\": {\n      \"exclude\": [\"ParserError\", \"NetworkError\"]\n    }\n  }]]\n}\n```\n\n```json\n{\n  \"presets\": [[\"minify\", {\n    \"keepFnName\": true\n  }]]\n}\n// is the same as\n{\n  \"presets\": [[\"minify\", {\n    \"mangle\": {\n      \"keepFnName\": true\n    },\n    \"deadcode\": {\n      \"keepFnName\": true\n    }\n  }]]\n}\n```\n\n[booleans]: ../../packages/babel-plugin-transform-minify-booleans\n[builtIns]: ../../packages/babel-plugin-minify-builtins\n[consecutiveAdds]: ../../packages/babel-plugin-transform-inline-consecutive-adds\n[deadcode]: ../../packages/babel-plugin-minify-dead-code-elimination\n[evaluate]: ../../packages/babel-plugin-minify-constant-folding\n[flipComparisons]: ../../packages/babel-plugin-minify-flip-comparisons\n[guards]: ../../packages/babel-plugin-minify-guarded-expressions\n[infinity]: ../../packages/babel-plugin-minify-infinity\n[mangle]: ../../packages/babel-plugin-minify-mangle-names\n[memberExpressions]: ../../packages/babel-plugin-transform-member-expression-literals\n[mergeVars]: ../../packages/babel-plugin-transform-merge-sibling-variables\n[numericLiterals]: ../../packages/babel-plugin-minify-numeric-literals\n[propertyLiterals]: ../../packages/babel-plugin-transform-property-literals\n[regexpConstructors]: ../../packages/babel-plugin-transform-regexp-constructors\n[removeConsole]: ../../packages/babel-plugin-transform-remove-console\n[removeDebugger]: ../../packages/babel-plugin-transform-remove-debugger\n[removeUndefined]: ../../packages/babel-plugin-transform-remove-undefined\n[replace]: ../../packages/babel-plugin-minify-replace\n[simplify]: ../../packages/babel-plugin-minify-simplify\n[simplifyComparisons]: ../../packages/babel-plugin-transform-simplify-comparison-operators\n[typeConstructors]: ../../packages/babel-plugin-minify-type-constructors\n[undefinedToVoid]: ../../packages/babel-plugin-transform-undefined-to-void\n","_id":"babel-preset-minify@0.5.0-alpha.34c3efe9","dist":{"shasum":"15568a2febf56793ac2b90018f2957af8d46fcac","tarball":"http://registry-npm.ywwl.com/babel-preset-minify/download/babel-preset-minify-0.5.0-alpha.34c3efe9.tgz","fileCount":5,"unpackedSize":13136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa66anCRA9TVsSAnZWagAAFQkP/iVky48agDhMUypqJO1T\ntrrGT2JZl+BuR+LlkNswNWe0iPNiYa3NTNS93V99dhsTR4selnTmSMZ3Z5o2\nRYumFhPSEhX6o1HmN0UQ+6We2FDETwKZ2LC75fQk2WICL9+vLRiZ6xkvYY1W\nnBiga0ropWSNKJRIt0BoogkilAkhsKnhmMGgNA4hd6p++YwdTxfflm5Fk5vd\n6aaDV95dCCdCS+vra9RLylUO3xR1ngcDTd6VCekbDFSxaLJlZ7ldIY3GGZTn\nuzbK9oAL4iNo4rChcmDh7Dyj2l1rUa91Z0GAmuMs63X/UgBy8DRr8D5LyDBf\nSzISupSsEW/QjJthbS7tHt9Dn3YbvjyrbbZCq/bpnhZK2R4aDYc+FSQOoQgZ\nSeXoru4CE8CBVlDHg40xpiSrfVhiQOtsLJcPsf5Wte18WgXhHXE+2IlVJ76O\nQk+Og5I2rs+D9a7+fGxX1GkXn6AoN/zyMAjo7Cf//NZ2TOkQtxVghUvb5Xxs\nfUYApKlXg7dIu9bQb/pmriukXwucZUcsc4nnkWfQOEz6WHO4MtmWo1OLGXwO\n9PynFUrVwFaA1eyphKbiv1wAnU7DBnrJA/14BhxELt3/dXRFIUtgJ+vRSgoS\nUee+j+yNj1t5lEAFVUDGqPNPqdXrTRY7Cc+nEbgUVVxz6tnA1sg9sRWZ9uuQ\nqTTO\r\n=f7/W\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-ZyKyTdq9uhi3ksZsUy3lgdzsOtraaHdEdOGJSppqAsX/ps/DMPCjPmoMiuow5/4wi4s4XAxVIByUHLHO7ZAKCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4W+S9g1QV4d2GeuW92OprhVKtzzRmhOc5j3Qi7wEpcAiEAlWgjEqKICtz7hIAj/xJkKr9CQWiN5DF07PNrHm5vemc="}],"size":3513,"noattachment":false,"key":"/babel-preset-minify/-/babel-preset-minify-0.5.0-alpha.34c3efe9.tgz"},"maintainers":[{"email":"amjad.masad@gmail.com","name":"amasad"},{"email":"asciiguyfieri@gmail.com","name":"babeljs"},{"email":"me@boopathi.in","name":"boopathi"},{"email":"hi@henryzoo.com","name":"hzoo"},{"email":"jonathanrichardong@gmail.com","name":"jongleberry"},{"email":"kangax@gmail.com","name":"kangax"},{"email":"loganfsmyth@gmail.com","name":"loganfsmyth"},{"email":"vignesh.shanmugam22@gmail.com","name":"vignesh.shanmugam"}],"_npmUser":{"name":"babeljs","email":"asciiguyfieri@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-preset-minify_0.5.0-alpha.34c3efe9_1525393062524_0.8432902957396393"},"_hasShrinkwrap":false,"publish_time":1525393062920,"_cnpm_publish_time":1525393062920,"dist-tags":{"canary":"0.6.0-alpha.9","latest":"0.5.2"}}