{"name":"babel-plugin-minify-replace","version":"0.5.0-alpha.55276695","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.55276695","dist":{"shasum":"0321c9b4b826f1116573e3e5d01d752aad17da77","tarball":"http://registry-npm.ywwl.com/babel-plugin-minify-replace/download/babel-plugin-minify-replace-0.5.0-alpha.55276695.tgz","fileCount":5,"unpackedSize":4041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa6KgLCRA9TVsSAnZWagAA6pQP/RR6UvlfiupdixTEU4H/\nutGHsX3xVulKaSJQ9CQmKGCDjhqbiZlWCZehPU1OP332WUraI8XAdldcff15\nV4ykqv0QgbigCX2AVKlbTwl7sFGqJVoOgTTf4CmABSoEDN55tATbTp+AQzPl\nhxQGW/ZGLUJYCVDAB1MWlRDKbPQ+eHpqfTpaCD4W8UHKoRYg0Qh9BW5Vf7zt\nEJqY2c3AnahGciXzOWoocdwDo7h+sGzhSrDl+4Y9ZS2LMe5rGDN1O6Xyx2Cm\nY4NT3McMZrc7kf+E7tx58yyK9ofnyFt4b1IzlAcuQlgkCtvtVor7SflXTPnC\nAFubRAcwTE5QeM/7s7LCWFl0k/fktHxGS3ukr37PFnhX24q4vo8GonS+QaGf\nkEC081cX5uuGeaYkYm5fHOFRcgrfC3l4h09NJkhP0jqO9VpxKFe/g1cSVFnH\nBQjP8gwyHt+Jyxhr+D2PeCyxWrYmc2BvhXyxne1PK9hWw5A8b4wTcIqgw6+h\ntDoAfdSMymnBI68E5JoNpul1fHg51w9kqwDa+NrjESN7s2LfHJFZkUx69u74\n+6gdsWVx8stKSLYKj5iMRkhNHOoNjBtU72oPzv98p3FkQT0kY9y2IQCkiRnj\ngs+PJSmoiSQzxoY5cqaS0uGjaRTLmR28M9ivvCovhYz4/UmCaF908W0myUl9\nezRT\r\n=AwAF\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-5P5Dq5EFrF49PVNhbuOYYpTGWFDZJmTBOa0ucKUY8fQIHH17HUFYCn1yly0RH12/VPCdtSGljZdBHArzFiZ8sA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkdRz9NZSynSZWudJ4E9CBAKGYvf5oZAs83TMlXWGbKQIgDfBpMpoijzc2q6sMbluB2R84EoruPqBodEG9SPl9Fdg="}],"size":1685,"noattachment":false,"key":"/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.5.0-alpha.55276695.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.55276695_1525196811375_0.5870162225285052"},"_hasShrinkwrap":false,"publish_time":1525196811474,"_cnpm_publish_time":1525196811474,"dist-tags":{"canary":"0.5.0-alpha.9","latest":"0.5.0"}}