{"name":"babel-plugin-minify-replace","version":"0.5.0-alpha.b4285271","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.b4285271","dist":{"shasum":"a97c959187b2f55b12f4328e75cb58ca67e69778","tarball":"http://registry-npm.ywwl.com/babel-plugin-minify-replace/download/babel-plugin-minify-replace-0.5.0-alpha.b4285271.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\nwsFcBAEBCAAQBQJa6OkRCRA9TVsSAnZWagAAHs8P/3hVF8EnwoCnUrXF9eLg\nHXJODRM4cMErDIUtv6COS4ImH6dqJtxiAkwIHCzKG1eVU1gm01AXjgVQDk+c\n6LVZCpza9ZXsfcruvL2qVAnOOpfOjVUjvEpMu6UT0k+y1QPdZq7S5qTsS8w8\n9EEOb/SptxlhsUUocfqFTayIvewsIlLnOybxWHRz5APK2Nc7maJxCvEXj039\nSeb4mQCeotReri58cc/qKUbwaNVXhwzSELSIpgObFVtBPy1v8uIDptyr72QI\nAUKm80jh2Lg4lDIcGoneF3KNy5TQzumFvw4VSf0H+v9GkZJ9CPWJlOmFnRRJ\nwSxIzKwlnePmWcwr8cNmZQOi6X2tTEGNe7huchQRqBvnV+XqA23DY1BLeIfH\nq0sp1+lpCIuJWJoGAvJkpYSSDbRWzEKt5tq6E2CPOIfeo+YnoPdmXzYOsbDk\neHte6FGsBtCi/R7JHSDLPG+A/Ps3TPfHEP1qaMgihL6oO7Sm+pvktWqiS09m\nfOYR4Af/YwZQNWJQbZNyADrpo/yG+CapdyS7MKvlVQudwznyDettH1U/a9Fv\nfom17usF31xi6XzOm++SAtN8oeHWfFFjblPlMii29Si47bD8b2aJ1+shJaaK\nBeIRAr63SeQ2VMl1L/bSMXsQCYSaFPnHFOyr3cocl73BaatrDaEmtbVSnnv3\nTV3Q\r\n=xdJP\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-UL2o4KEiomG6TGIMiG757cmZJ42vaIZ1xGsqTlzJso79CV10l6jnswKJz3Z4nBjWoLulGYM0QATzVMyb82m6hg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/54ywmtauB8Cu4+/byv7lM9qwj8c63ERMk1sqjHO7ZQIhAJWDU7x7BPywhsxypqE1ZL0PDoaWNW8bJoW+xAJvASrG"}],"size":1673,"noattachment":false,"key":"/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.5.0-alpha.b4285271.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.b4285271_1525213456286_0.06702912448758735"},"_hasShrinkwrap":false,"publish_time":1525213456530,"_cnpm_publish_time":1525213456530,"dist-tags":{"canary":"0.5.0-alpha.9","latest":"0.5.0"}}