{"name":"babel-plugin-minify-replace","version":"0.5.0-alpha.41ef96a2","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 --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","_id":"babel-plugin-minify-replace@0.5.0-alpha.41ef96a2","dist":{"shasum":"c4eae9dba1978aa9579c60f29bc584a8dab18f7b","tarball":"http://registry-npm.ywwl.com/babel-plugin-minify-replace/download/babel-plugin-minify-replace-0.5.0-alpha.41ef96a2.tgz","fileCount":5,"unpackedSize":3982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbEVaYCRA9TVsSAnZWagAAhk8P/0gCjTx9xXyRW+7I7Tm2\n5cKDlp6akJS/Db3y8XBlo+rULx2t4z6okRxLMiBNNsaU0Sw/xKKg0rsEvt+Z\np8NN+jke5CgyCdmk0vIGUpopbP6tbY9qG2i5dz58kWePZ1UC9trynjULkLb3\nJtOpaB2MHuJ3hPMT4uh6UcttPD8tgFQg7LIOk02RYLYh+6hzLhJ+ex3YJ6ka\ng6VmIe3KZrZ9EV+5W1phh3gW5bzNI4A6M5pa68BxTaIc3cz8E8mG/BYzb7r9\n/RmybP+zvmQ1CpoaGXw+hafqSQw8GtkO7Tp/zmsIhrvwOCSrX9sRhKpIb0sP\ntW8oXTC61/KCr40qAsD8XpHIbRhkrmjOKcVPoxPW7/wKaT+Frb0BVr7VkZJZ\nNM63Z4GiDPAB+QqTGYSBP/2eyuTdA6d0yjLQpDXWWURB7tfecoqxP2nHlqQe\nUA6uTGjC0XbhfWXfR0yM4WAt8dq3HFN8z8gLe6ugQHFadhy95Q0YruvjC+2h\n4JWGhbVsXiDV+b+gTNeeMiMt2MaRfWtdGUJ1AVXgKudyQTxrNuv2OBA2yrRI\n3up71bLoefOr4i7+HJSf3WOIt+Auj1VWYg9t75uZTfZiwYOhvCtCqewIcmMG\n2QlwixzQUzDdimbysEShArHfqm8ER4TMB8xz+kG9jWUQupgYVecwsW3bEIQN\nxG0I\r\n=Ps6c\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-F+sjrfEHxUp+dUcqVsypKsKxXrFDPjQY573ka3pHoyhMwHNBawS4Wmuvkmcku9yt2CPrwrQVpqMnaNnEEzuHlw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6Q8W/zqhaKIPhwSy7Fm5tt7v43ws+uOclSkJfmvZwAAiEA/sN88kkqlLOmpxKHf3KdN+vWlyx3sSWQEEaiTNYn0Ls="}],"size":1676,"noattachment":false,"key":"/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.5.0-alpha.41ef96a2.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.41ef96a2_1527862935909_0.9637111877262794"},"_hasShrinkwrap":false,"publish_time":1527862936007,"_cnpm_publish_time":1527862936007,"dist-tags":{"canary":"0.5.0-alpha.9","latest":"0.5.0"}}