{"name":"babel-plugin-minify-replace","version":"0.5.0-alpha.9e986477","description":"Configurable \"search and replace\" plugin. Replaces matching nodes in the tree with a given replacement node. For example you can replace `process.NODE_ENV` with `\"production\"`.","keywords":["babel-plugin"],"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-plugin-minify-replace"},"readmeFilename":"README.md","readme":"# babel-plugin-minify-replace\n\nConfigurable \"search and replace\" plugin. Replaces matching nodes in the tree with a given replacement node. For example you can replace `process.NODE_ENV` with `\"production\"`.\n\n## Example\n\n**Options**\n\n```javascript\n[\n  {\n    identifierName: \"__DEV__\",\n    replacement: {\n      type: \"numericLiteral\",\n      value: 0,\n    },\n  },\n]\n```\n\n**In**\n\n```javascript\nif (!__DEV__) {\n  foo();\n}\nif (a.__DEV__) {\n  foo();\n}\n```\n\n**Out**\n\n```javascript\nif (!0) {\n  foo();\n}\nif (a.__DEV__) {\n  foo();\n}\n```\n\n## Installation\n\n```sh\nnpm install babel-plugin-minify-replace\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n// without options\n{\n  \"plugins\": [\"minify-replace\"]\n}\n```\n\n```json\n// with options\n{\n  \"plugins\": [\n    [\"minify-replace\", {\n      \"replacements\": [{\n        \"identifierName\": \"__DEV__\",\n        \"replacement\": {\n          \"type\": \"booleanLiteral\",\n          \"value\": true\n        }\n      }]\n    }]\n  ]\n}\n```\n\n### Via CLI\n\n```sh\nbabel --plugins minify-replace script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"@babel/core\").transform(\"code\", {\n  plugins: [\"minify-replace\"]\n});\n```\n","_id":"babel-plugin-minify-replace@0.5.0-alpha.9e986477","dist":{"shasum":"749338d492192fd9daade998595fb80bcc893456","tarball":"http://registry-npm.ywwl.com/babel-plugin-minify-replace/download/babel-plugin-minify-replace-0.5.0-alpha.9e986477.tgz","fileCount":5,"unpackedSize":3971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa66ZWCRA9TVsSAnZWagAA0XgQAIu2yfWsaCU/XGlZwNr+\nm03FGCr8PxbcHSL5Jd4SUkC7usvlToKVoALGNddAlwNvEz9OZubA5uOVqwJZ\nVSmNTTqSIjKk4y/s0S479oyLe8w4gfTFMuzzMEvGZQKr28oulcE8cTN6QbAD\n/nLnE7+49Y/81Vw0ey+n8qqXkyUwcmIz1MxxOh8cIJE/WZv6w9V4TUNkuim+\nx/mxUh651AyVhHOMchoEhIZgNBNkq2izLybdfjG7TAJ+dEQIp+zevShGPYUb\nfNO/gSqLZX8s5os+RhZhuRRy76dojkexejiSA5isqnrsDESfZq7AjhP9I3YI\nFUaoFti7/Tgd+E3279Z19mGzUHVhGBBd87NRKwr4OXds3oRJrQySlPuBboBY\nXlZRvP2gW8/ii7ptWuuP9aYwRGRth48rlpeP2PUEEzoHchv3NVQpf1BB+QbG\neYDwN49eWqP/Uy/AulewoQV/tcwNG+/+jbagOxhNPEvKvtbPZ4IbY5PJNeud\nsQkuBW9iPXfurf9yqnfmrIZLfvWmMBHzZf02pVeKdmJxyTspxXuAZWj4lRQm\n+CfO34gSqgDWDAyRVowCEsamVHaOTscELH3AI+NEL2rrSzF5c2UuEcjtqhGN\nrngd6Gp8dLrrZXI01o0ayONYlpTt2uYseykBOh6bo7/fJMWWcU1otbH+aX+j\nnv5A\r\n=12a8\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-tDV7EtP63i3Iu8zjERW3ac1aVTaGJkDZjlC7kUwjn8dBoNHJi4BLBWn+P8hflTvv6DtHMgBghB1dphwORYE8qw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrJpTq0pR4UP35ebPP/JbciwFXBeVy6qwzLhtlqmRMXwIhAO6yLkAIgwMSFckXQjolUk/AN4Zat9lx9j1tANSNJlAu"}],"size":1673,"noattachment":false,"key":"/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.5.0-alpha.9e986477.tgz"},"maintainers":[{"email":"asciiguyfieri@gmail.com","name":"babeljs"},{"email":"me@boopathi.in","name":"boopathi"},{"email":"hi@henryzoo.com","name":"hzoo"},{"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-plugin-minify-replace_0.5.0-alpha.9e986477_1525392981791_0.1904755603249093"},"_hasShrinkwrap":false,"publish_time":1525392981881,"_cnpm_publish_time":1525392981881,"dist-tags":{"canary":"0.5.0-alpha.9","latest":"0.5.0"}}