{"name":"babel-plugin-minify-replace","version":"0.5.0-alpha.01eac1c3","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.01eac1c3","dist":{"shasum":"ae3a342f48dd99ae78a8b4a6806ed7d9a76c6a3f","tarball":"http://registry-npm.ywwl.com/babel-plugin-minify-replace/download/babel-plugin-minify-replace-0.5.0-alpha.01eac1c3.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\nwsFcBAEBCAAQBQJa/hJnCRA9TVsSAnZWagAAgt8P/2MtJq5Cd6vvxeBxPwQ7\nh75y4LwBrWWAqvY/TM4eMvHYmp2132CqvFIvA4PQUzDoBAvSSiTJkFUvRw1N\ne9KDUfCIwDQRcnHpXKbAKQ/TGgCz7gjYfkXsgAEUzOcLuJlPZo8LonMThwQg\n1S+w4bzKoDFjJSGaue2+5S6Kc0Ielh+m0oY8d0wnqW63ZI95lexjYO5iEKNw\nm8wB6gkW/W7s6o+1HiOSsi53iYcgFZlJV6Rz9V705XV5ukNwKtu2tASZCTD7\n6mDI3qdXEX30L6lhTfxVKQuNm4isiXpz9nRhVheOL9wW0iEztPVFfR7KUgG4\ngCtD0Pl9ZF8AadFIqrwi5fKBqVOP+qAmZnCfnLIhMlXaidnJo8DBfR+luIe8\nEoq/oJnhOObcHnu3ZOs2g5NWYcasCWp5JykMqJQGYy+p1OhKtepWKYt6g1zh\nHnQP4DS720dl5Fv4acFlTe2ZOHSot9Loi850hq1II+yl4yUrApU/zEORhrYY\n88K8MaanZpgtmYvdGiaYK3aZZ/UA8WreuUkpqpw535X0B6doPIEAgqXdhm52\n0Lf3PfZCr5r6+ymw03m2xILVPziybkLhIX8S1tgaSI09/wALjaDTJzB15BAO\n4F1gkI+lRYaX2bUwCDdePt8zIvuQ3+VJ1XDckFibXSPHt19d0TEr+YpsIvCA\nubMB\r\n=s66V\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-TTT4ydT4jdBNdeD9DtzqolH+mXjg6UwXRGzu5n9w6KU4svpgcs2+MTTVgBisqAVDZ58Tfq/X/VU6c/WJCWBRow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvZLuAZhMrCccJw90DxaC5IO1XFWkGd9Lht3C5BoR7JgIhALH8/g1eVHp2MaHAHhLXHFUVVPW1nvzc7eKW8b4sLVb1"}],"size":1678,"noattachment":false,"key":"/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.5.0-alpha.01eac1c3.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.01eac1c3_1526600295188_0.7314128912505942"},"_hasShrinkwrap":false,"publish_time":1526600295421,"_cnpm_publish_time":1526600295421,"dist-tags":{"canary":"0.5.0-alpha.9","latest":"0.5.0"}}