{"bugs":{"url":"https://github.com/babel/minify/issues"},"dist":{"shasum":"904673e24978a9fd7a9f7bc6dd860c33ed950e83","tarball":"https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.5.0-alpha.2ed85317.tgz","fileCount":5,"integrity":"sha512-oIgGag9FfYL7c3JKNH+sL4ShOg6nvLpc76X4koaCpT7Nd461aZ2yzqR4xdIScdbXxjhXtgd0SEo7jgT/30eGyA==","signatures":[{"sig":"MEUCIQCWBpsfR/qLwi5fGgTrH2G9cqiosduTKHZo3Bq4FTHv5wIgVaWd67BvYVTKNw0gwZdJjijyI/NhU3Ne31BFhCc/Jgo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3982},"main":"lib/index.js","name":"babel-plugin-minify-replace","author":{"name":"amasad"},"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 --save-dev\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","license":"MIT","_npmUser":{"name":"babeljs","email":"asciiguyfieri@gmail.com"},"homepage":"https://github.com/babel/minify#readme","keywords":["babel-plugin"],"repository":{"url":"https://github.com/babel/minify/tree/master/packages/babel-plugin-minify-replace","type":"git"},"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\"`.","directories":{},"maintainers":[{"name":"babeljs","email":"asciiguyfieri@gmail.com"},{"name":"boopathi","email":"me@boopathi.in"},{"name":"hzoo","email":"hi@henryzoo.com"},{"name":"loganfsmyth","email":"loganfsmyth@gmail.com"},{"name":"vignesh.shanmugam","email":"vignesh.shanmugam22@gmail.com"}],"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/babel-plugin-minify-replace_0.5.0-alpha.2ed85317_1531863502383_0.841954688712856","host":"s3://npm-registry-packages"},"_id":"babel-plugin-minify-replace@0.5.0-alpha.2ed85317","version":"0.5.0-alpha.2ed85317"}