{"name":"babel-preset-minify","version":"0.3.0-alpha.9a74dfd1","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.3.0-alpha.9a74dfd1","babel-plugin-minify-constant-folding":"^0.3.0-alpha.9a74dfd1","babel-plugin-minify-dead-code-elimination":"^0.3.0-alpha.9a74dfd1","babel-plugin-minify-flip-comparisons":"^0.3.0-alpha.9a74dfd1","babel-plugin-minify-guarded-expressions":"^0.3.0-alpha.9a74dfd1","babel-plugin-minify-infinity":"^0.3.0-alpha.9a74dfd1","babel-plugin-minify-mangle-names":"^0.3.0-alpha.9a74dfd1","babel-plugin-minify-numeric-literals":"^0.3.0-alpha.9a74dfd1","babel-plugin-minify-replace":"^0.3.0-alpha.9a74dfd1","babel-plugin-minify-simplify":"^0.3.0-alpha.9a74dfd1","babel-plugin-minify-type-constructors":"^0.3.0-alpha.9a74dfd1","babel-plugin-transform-inline-consecutive-adds":"^0.3.0-alpha.9a74dfd1","babel-plugin-transform-member-expression-literals":"^6.9.0-alpha.9a74dfd1","babel-plugin-transform-merge-sibling-variables":"^6.9.0-alpha.9a74dfd1","babel-plugin-transform-minify-booleans":"^6.9.0-alpha.9a74dfd1","babel-plugin-transform-property-literals":"^6.9.0-alpha.9a74dfd1","babel-plugin-transform-regexp-constructors":"^0.3.0-alpha.9a74dfd1","babel-plugin-transform-remove-console":"^6.9.0-alpha.9a74dfd1","babel-plugin-transform-remove-debugger":"^6.9.0-alpha.9a74dfd1","babel-plugin-transform-remove-undefined":"^0.3.0-alpha.9a74dfd1","babel-plugin-transform-simplify-comparison-operators":"^6.9.0-alpha.9a74dfd1","babel-plugin-transform-undefined-to-void":"^6.9.0-alpha.9a74dfd1","lodash.isplainobject":"^4.0.6"},"_id":"babel-preset-minify@0.3.0-alpha.9a74dfd1","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"babeljs","email":"asciiguyfieri@gmail.com"},"dist":{"integrity":"sha512-SkxBgWOBlQ+3NQLHHcm8PLVC9Gqz5DyF7eSNvPEuQ1uqf9zSWFDdmL1kE7871gEEDwa3B9D0fAgPhY5DEfVyMA==","shasum":"67dba9ff9d0a6a47082146145e11aaadede8af44","tarball":"http://registry-npm.ywwl.com/babel-preset-minify/download/babel-preset-minify-0.3.0-alpha.9a74dfd1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCDKABWD+sGFG+krePGi1pn4bM3HCjMyu4fpUX7pOl3AIhAIkDiQ0Y+Be8NfDX90QekCfMgzNWtYvLDL4T93u8m7Ny"}],"size":3653,"noattachment":false,"key":"/babel-preset-minify/-/babel-preset-minify-0.3.0-alpha.9a74dfd1.tgz"},"maintainers":[{"email":"vignesh.shanmugam22@gmail.com","name":"vignesh.shanmugam"},{"email":"kangax@gmail.com","name":"kangax"},{"email":"amjad.masad@gmail.com","name":"amasad"},{"email":"me@boopathi.in","name":"boopathi"},{"email":"hi@henryzoo.com","name":"hzoo"},{"email":"jonathanrichardong@gmail.com","name":"jongleberry"},{"email":"asciiguyfieri@gmail.com","name":"babeljs"},{"email":"loganfsmyth@gmail.com","name":"loganfsmyth"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-preset-minify-0.3.0-alpha.9a74dfd1.tgz_1512820137180_0.34631596063263714"},"directories":{},"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 babel-preset-minify --save-dev\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\nconst babel = require(\"@babel/core\");\nconst fs = require(\"fs\");\n\nconst code = fs.readFileSync(\"./input.js\").toString();\n\nconst minified = babel.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","publish_time":1512820138149,"_cnpm_publish_time":1512820138149,"dist-tags":{"canary":"0.6.0-alpha.9","latest":"0.5.2"}}