{"name":"babel-preset-minify","version":"0.5.0-alpha.2ec8ff72","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.2ec8ff72","babel-plugin-minify-constant-folding":"^0.5.0-alpha.2ec8ff72","babel-plugin-minify-dead-code-elimination":"^0.5.0-alpha.2ec8ff72","babel-plugin-minify-flip-comparisons":"^0.5.0-alpha.2ec8ff72","babel-plugin-minify-guarded-expressions":"^0.5.0-alpha.2ec8ff72","babel-plugin-minify-infinity":"^0.5.0-alpha.2ec8ff72","babel-plugin-minify-mangle-names":"^0.5.0-alpha.2ec8ff72","babel-plugin-minify-numeric-literals":"^0.5.0-alpha.2ec8ff72","babel-plugin-minify-replace":"^0.5.0-alpha.2ec8ff72","babel-plugin-minify-simplify":"^0.5.0-alpha.2ec8ff72","babel-plugin-minify-type-constructors":"^0.5.0-alpha.2ec8ff72","babel-plugin-transform-inline-consecutive-adds":"^0.5.0-alpha.2ec8ff72","babel-plugin-transform-member-expression-literals":"^6.10.0-alpha.2ec8ff72","babel-plugin-transform-merge-sibling-variables":"^6.10.0-alpha.2ec8ff72","babel-plugin-transform-minify-booleans":"^6.10.0-alpha.2ec8ff72","babel-plugin-transform-property-literals":"^6.10.0-alpha.2ec8ff72","babel-plugin-transform-regexp-constructors":"^0.5.0-alpha.2ec8ff72","babel-plugin-transform-remove-console":"^6.10.0-alpha.2ec8ff72","babel-plugin-transform-remove-debugger":"^6.10.0-alpha.2ec8ff72","babel-plugin-transform-remove-undefined":"^0.5.0-alpha.2ec8ff72","babel-plugin-transform-simplify-comparison-operators":"^6.10.0-alpha.2ec8ff72","babel-plugin-transform-undefined-to-void":"^6.10.0-alpha.2ec8ff72","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 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\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.2ec8ff72","dist":{"shasum":"fb21cfda1f9a09c8481ab6a6080e979a4e9773db","tarball":"http://registry-npm.ywwl.com/babel-preset-minify/download/babel-preset-minify-0.5.0-alpha.2ec8ff72.tgz","fileCount":5,"unpackedSize":13115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBB62CRA9TVsSAnZWagAAw7UP/1RUXARDNlr80VdEiKfM\nx5W08j4s7P1vTVNDmFU7T43I16b38nsbqE65ogA3g0W3z1ZrkAGrA/0untaF\nSPB8SQhwjs7BsmrlAWjzyGOiJ7KwM/Jhn4chNoNiqfOJ9jtFis4zGGIQ3r61\nr/i9aCTAGwzlbVufUYDr5GVWptlhif+wTi9aAHDkBkI/F1jYuIoX6zGxgQv6\nZGef/c4CIUBdjUrr21XWzoNAazU8Q93lRKXoaZg9jLUUHRRPyaDnfXW851y5\n53e6NgSlzC1ja+ZqpXmzPrJ3I65dsVW207KZHmRtNJiZNqOICnmGkd80sUid\n2z/66fn6EY2ghH//P5cgiRIKNYYne269OW24PDpV3/izDLT9vpVaPpuHT1uA\n2KE5wSczz0rThwhLl9U2LradVA1HgF5XrflOlKqTUy0jL7oSdwwJnuCDkAGr\nHWyBeGhIhuXM9WFT83Rb+QzppZwWYdCFrn1tlTQNGvqg1aNo0Vk+tAa2hCxj\nNtFFtmOcznLpkJApZ7Le8NM1lAy16hz/NoKl2Zb4/Au92lXDtBNnq9J/WEA8\ndn8KL94i7Ra6FYbFChZDJznPwlT7gD16q3DqwYIBIhg/Kz2gnUwWxXOCXoxw\nkymTk350HjnAQYahBQnOJYzzY/n+7HPEzt0Gimkmk5tl6ZuLSc4dp7Gwh/l7\nIvg+\r\n=Io+x\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-tFy6TZp2T3nbCYC56VhDGhXRqK0Zr3ykGtIQ+mfzjgqrqJLrzc4NuLmmqDwo52/x5JFoAWfkH+Ngl9Wr5UMSgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGCm6ZMEM1FGxVmbHSuiHv0SWPfiF+8aZa2DsDaHjS4wAiBNH0Jhqc2guZlyoETzUe1avs5RC+6uswzAEX+DS1lndg=="}],"size":3507,"noattachment":false,"key":"/babel-preset-minify/-/babel-preset-minify-0.5.0-alpha.2ec8ff72.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.2ec8ff72_1526996661187_0.9092446686645843"},"_hasShrinkwrap":false,"publish_time":1526996661278,"_cnpm_publish_time":1526996661278,"dist-tags":{"canary":"0.6.0-alpha.9","latest":"0.5.2"}}