{"_id":"replace-in-file-webpack-plugin","_rev":"9-81a28f695c9f174631c5b22551b64c0c","name":"replace-in-file-webpack-plugin","description":"A webpack plugin to replace strings in file(s) after building","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"replace-in-file-webpack-plugin","version":"1.0.0","description":"A webpack plugin to replace strings in file(s) after building","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/oyslin/replace-in-file-webpack-plugin.git"},"keywords":["webpack","plugin","replace","file"],"author":{"name":"Walt Ouyang","email":"oyslin@163.com"},"license":"MIT","bugs":{"url":"https://github.com/oyslin/replace-in-file-webpack-plugin/issues"},"homepage":"https://github.com/oyslin/replace-in-file-webpack-plugin#readme","gitHead":"1ba22f89579e8a2bc3fd371f0ae398deded4813b","_id":"replace-in-file-webpack-plugin@1.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.1.1","_npmUser":{"name":"waouyang","email":"oyslin@163.com"},"dist":{"integrity":"sha512-6wrgiVhWwSnbex0nwLzxzxUevmtzY226tTnp4pMKaXaH2/WYeR/l91UkfHroHiUQ9CbP5cwzhNxbnrL2c74uCQ==","shasum":"b34275e5d9c9beb97f5300fd7d72e4d9099f7979","tarball":"https://registry.npmjs.org/replace-in-file-webpack-plugin/-/replace-in-file-webpack-plugin-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEvUW3N1AhKR/uGuAj+1XGBY/yHgdCtA9Zb8fO6X+rDsAiEAlRot9Sh16iHuj9ls4XxVRFHYuD3qA5g/BIho/D/plEs="}]},"maintainers":[{"name":"waouyang","email":"oyslin@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-in-file-webpack-plugin-1.0.0.tgz_1505373276420_0.09420242346823215"},"directories":{}},"1.0.1":{"name":"replace-in-file-webpack-plugin","version":"1.0.1","description":"A webpack plugin to replace strings in file(s) after building","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/oyslin/replace-in-file-webpack-plugin.git"},"keywords":["webpack","plugin","replace","file"],"author":{"name":"Walt Ouyang","email":"oyslin@163.com"},"license":"MIT","bugs":{"url":"https://github.com/oyslin/replace-in-file-webpack-plugin/issues"},"homepage":"https://github.com/oyslin/replace-in-file-webpack-plugin#readme","gitHead":"211f0d159f8dd8ce86bde44dd90a858dc87a287e","_id":"replace-in-file-webpack-plugin@1.0.1","_npmVersion":"5.4.2","_nodeVersion":"8.1.1","_npmUser":{"name":"waouyang","email":"oyslin@163.com"},"dist":{"integrity":"sha512-rPuezD4inutBcBBKd3MZTvcTcxH/L5+T8t84EmNGriTX+gDhrg4B0yaWiJML1ImHGnoCvISO7db9mNYGJCDo0w==","shasum":"a29cade18e8ed64984d3a52dad6b61287e135598","tarball":"https://registry.npmjs.org/replace-in-file-webpack-plugin/-/replace-in-file-webpack-plugin-1.0.1.tgz","fileCount":4,"unpackedSize":6134,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDJf5M0Z0QcMrF6KWgnkPM6muFVy840PChWHBR3BkQ/sAiBMRt6BpdYG6RZzXqE/R/1WmYTL51i4lS/a77afz+7HZA=="}]},"maintainers":[{"name":"waouyang","email":"oyslin@163.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-in-file-webpack-plugin_1.0.1_1519961313925_0.9650360766351445"},"_hasShrinkwrap":false},"1.0.2":{"name":"replace-in-file-webpack-plugin","version":"1.0.2","description":"A webpack plugin to replace strings in file(s) after building","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/oyslin/replace-in-file-webpack-plugin.git"},"keywords":["webpack","plugin","replace","file"],"author":{"name":"Walt Ouyang","email":"oyslin@163.com"},"license":"MIT","bugs":{"url":"https://github.com/oyslin/replace-in-file-webpack-plugin/issues"},"homepage":"https://github.com/oyslin/replace-in-file-webpack-plugin#readme","gitHead":"a6b8d35212017dfee6906e0c23fbf6e5fa85951c","_id":"replace-in-file-webpack-plugin@1.0.2","_npmVersion":"5.4.2","_nodeVersion":"8.1.1","_npmUser":{"name":"waouyang","email":"oyslin@163.com"},"dist":{"integrity":"sha512-G3VAs8DMld0COCaKHOa4KMBlt8A4il8qlM54ZQnJTpchrh0do33t0iIZdd4+RxsvJb9ApFL6xLi4tCja5STLbA==","shasum":"32ccbe3efc36bdf11d73db97587d05510c4fe32c","tarball":"https://registry.npmjs.org/replace-in-file-webpack-plugin/-/replace-in-file-webpack-plugin-1.0.2.tgz","fileCount":4,"unpackedSize":6169,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC8OIlzGyRRNCavnRJJ6EK/KHB9UYRJ3acuF3NJHvvQ9AiAtfo+mSR4y7radH3dUogVVG56NdjY87bmBM1N4Lt0HKA=="}]},"maintainers":[{"name":"waouyang","email":"oyslin@163.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-in-file-webpack-plugin_1.0.2_1519984864059_0.5120679307523031"},"_hasShrinkwrap":false},"1.0.3":{"name":"replace-in-file-webpack-plugin","version":"1.0.3","description":"A webpack plugin to replace strings in file(s) after building","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/oyslin/replace-in-file-webpack-plugin.git"},"keywords":["webpack","plugin","replace","file"],"author":{"name":"Walt Ouyang","email":"oyslin@163.com"},"license":"MIT","bugs":{"url":"https://github.com/oyslin/replace-in-file-webpack-plugin/issues"},"homepage":"https://github.com/oyslin/replace-in-file-webpack-plugin#readme","gitHead":"a6b8d35212017dfee6906e0c23fbf6e5fa85951c","_id":"replace-in-file-webpack-plugin@1.0.3","_npmVersion":"5.4.2","_nodeVersion":"8.1.1","_npmUser":{"name":"waouyang","email":"oyslin@163.com"},"dist":{"integrity":"sha512-0QTyImr15U7eQDl0enVJPZbrO5AKwbBIGCVfwcuf2h4AezWBQeBTTCkzqkBln2kqJzwXzJU4Hy91NbtYsS/Lxg==","shasum":"005fa84a5570803e7011d54cfd4993275f7edf3f","tarball":"https://registry.npmjs.org/replace-in-file-webpack-plugin/-/replace-in-file-webpack-plugin-1.0.3.tgz","fileCount":4,"unpackedSize":6174,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICvXuUiqoUBIe0o1TQqWmVZ4cCc9jJ0FomyOC65lzI6mAiEA0TkVlvfAKF3HoGSzJNRrU4cXCd9T1Z3kZT2z4L0xees="}]},"maintainers":[{"name":"waouyang","email":"oyslin@163.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-in-file-webpack-plugin_1.0.3_1519987595853_0.20744326862685614"},"_hasShrinkwrap":false},"1.0.4":{"name":"replace-in-file-webpack-plugin","version":"1.0.4","description":"A webpack plugin to replace strings in file(s) after building","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/oyslin/replace-in-file-webpack-plugin.git"},"keywords":["webpack","plugin","replace","file"],"author":{"name":"Walt Ouyang","email":"oyslin@163.com"},"license":"MIT","bugs":{"url":"https://github.com/oyslin/replace-in-file-webpack-plugin/issues"},"homepage":"https://github.com/oyslin/replace-in-file-webpack-plugin#readme","gitHead":"58a3ea08e2caa7af796f2107b49d539edd1b399e","_id":"replace-in-file-webpack-plugin@1.0.4","_npmVersion":"5.4.2","_nodeVersion":"8.1.1","_npmUser":{"name":"waouyang","email":"oyslin@163.com"},"dist":{"integrity":"sha512-aWpMleV/DpysaMv+MilzpkriqmT+Eq9zrgK7l23jIcrahvg0YVclsYSyi0bZB+7hiCR4utuU4vuuIK81PCY23g==","shasum":"0098eb7ec387f43d6fb591bfb0eaa0d025f0d504","tarball":"https://registry.npmjs.org/replace-in-file-webpack-plugin/-/replace-in-file-webpack-plugin-1.0.4.tgz","fileCount":4,"unpackedSize":6194,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqJ6NkQ6RLSEgTLMQdaHGQH5sRr/YTFybcAq8i6yh0UAIgUsM1yqFxgwH8WNl73eSST9GGJ60o2EWjRd8ysIq0AzI="}]},"maintainers":[{"name":"waouyang","email":"oyslin@163.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-in-file-webpack-plugin_1.0.4_1520008286079_0.8887903645304471"},"_hasShrinkwrap":false},"1.0.5":{"name":"replace-in-file-webpack-plugin","version":"1.0.5","description":"A webpack plugin to replace strings in file(s) after building","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/oyslin/replace-in-file-webpack-plugin.git"},"keywords":["webpack","plugin","replace","file"],"author":{"name":"Walt Ouyang","email":"oyslin@163.com"},"license":"MIT","bugs":{"url":"https://github.com/oyslin/replace-in-file-webpack-plugin/issues"},"homepage":"https://github.com/oyslin/replace-in-file-webpack-plugin#readme","gitHead":"b462abf8862460bdce8dbc41e22e0e6c1883f238","_id":"replace-in-file-webpack-plugin@1.0.5","_npmVersion":"5.4.2","_nodeVersion":"8.1.1","_npmUser":{"name":"waouyang","email":"oyslin@163.com"},"dist":{"integrity":"sha512-aKwAuYcglDt05tIFbmnvmE48JnKIs+KVSBGa2CkRzvyDWiIF53+Xo3NrmvNfhWjwIfQkGIYcH0XV/XRgB/aw6A==","shasum":"9a6979cb9504884553918bdb57e0ec7bd76de8ef","tarball":"https://registry.npmjs.org/replace-in-file-webpack-plugin/-/replace-in-file-webpack-plugin-1.0.5.tgz","fileCount":4,"unpackedSize":6189,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRcRQg8kaC9vvTvPxjAEXJ8A1adjs8T2sKvzYOX2aWIgIhAP2u9PXotU4iG4EtLXicqzRdsJMZD6/KdEMa9EVl8t+b"}]},"maintainers":[{"name":"waouyang","email":"oyslin@163.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-in-file-webpack-plugin_1.0.5_1520229120254_0.6237957903459204"},"_hasShrinkwrap":false},"1.0.6":{"name":"replace-in-file-webpack-plugin","version":"1.0.6","description":"A webpack plugin to replace strings in file(s) after building","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/oyslin/replace-in-file-webpack-plugin.git"},"keywords":["webpack","plugin","replace","file"],"author":{"name":"Walt Ouyang","email":"oyslin@163.com"},"license":"MIT","bugs":{"url":"https://github.com/oyslin/replace-in-file-webpack-plugin/issues"},"homepage":"https://github.com/oyslin/replace-in-file-webpack-plugin#readme","gitHead":"e69d7ad390deb742c45d76dd7f29dbdc5a03e273","_id":"replace-in-file-webpack-plugin@1.0.6","_npmVersion":"5.7.1","_nodeVersion":"8.1.1","_npmUser":{"name":"waouyang","email":"oyslin@163.com"},"dist":{"integrity":"sha512-+KRgNYL2nbc6nza6SeF+wTBNkovuHFTfJF8QIEqZg5MbwkYpU9no0kH2YU354wvY/BK8mAC2UKoJ7q+sJTvciw==","shasum":"eee7e139be967e8e48a0552f73037ed567b54dbd","tarball":"https://registry.npmjs.org/replace-in-file-webpack-plugin/-/replace-in-file-webpack-plugin-1.0.6.tgz","fileCount":4,"unpackedSize":6363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/SwpCRA9TVsSAnZWagAAauEP/0TScLV/dAzVXlvRLNLv\ngUHDQaXuQWYrZzgIb7WWaU2za4LBoH/QHZLrofFgGFCXK6Jo9wan7ojTQhux\nwmx6Ix1Y1YYAJzeihp01KaW7cgt19s8cGMUwztyhf2aDT1Jvo4j5mqsx8/6Y\nymz7xvo9kGdN6nj1Pwdeah8c/j4ze9AroUV0NKOHY3QtIb48BSnJ0WoY6iPn\nDxc3kc7RD+E6luAMX8jWwON8NMoEhYo2sKXytXwToSyQeB9FPiKydlBxoGsu\n51OzF8buRDi9/IaDjgQZySA63iJrXRaGu3Vd66FoCsT5sUlRJHjGEMx3APH0\naIwsSWbZ6royyC3YCvwGVPC1+06Urf+oSM7oQSoE97flERK/eSCZXqwIwr99\nGU0ifJsZdCBlYV+d+pu94yEK8VKbpgH7lb7HU0/awvhDtVYUOyncxPGmINC6\nWxIYFsc92ZupmqfNWgTJTjsfjYnAggCx43GyK0ZoI0P1bQpHheGfCbjo2deQ\nbc1RR+p0FezUgzndy1NRwaGBEVJSvvqX/HoJV62qxnK4D/7cTsBoMx68Zelx\nUYMFskgNx36ebxCxHxRmofxMDj9p0M6XXMLkfo8sR0TBrf4C0z1W6xsDQB3i\nn1AZAMrzvh0glvotITbGKVFLOT7TVtUqD9OGHkyLQLaT1Nas2U9WM3eW73AN\nrexv\r\n=JrVM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID28hWGGLPq5ZBQMA4pptBHLs9Zza6oa8L/txtrvjUKAAiEAy8dYVfDu7t7lE+xQOpGd0p5DwgY9lP3unybFLAlG3Eo="}]},"maintainers":[{"name":"waouyang","email":"oyslin@163.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-in-file-webpack-plugin_1.0.6_1526541351794_0.04387730545802149"},"_hasShrinkwrap":false}},"readme":"## Webpack plugin: replace-in-file-webpack-plugin\n\nThis is a [webpack](http://webpack.github.io/) plugin that can replace content in file(s) after compilation is done. This is useful when you want to replace content in any kind of files(html, css, js etc) which are not processed by loaders.\n\nInstallation\n============\nInstall the plugin with npm:\n```shell\n$ npm install replace-in-file-webpack-plugin --save-dev\n```\n\nBasic Usage\n===========\nAdd the plugin to your webpack and config as follows:\n\n```javascript\n    const ReplaceInFileWebpackPlugin = require('replace-in-file-webpack-plugin');\n    const webpackConfig = {\n        entry: 'index.js',\n        output: {\n            path: __dirname + '/dist',\n            filename: 'index_bundle.js'\n        },\n        plugins: [\n            new ReplaceInFileWebpackPlugin([{\n                dir: 'dist',\n                files: ['index.html', 'main.html'],\n                rules: [{\n                    search: '@class',\n                    replace: 'main-class'\n                },{\n                    search: /@title/,\n                    replace: 'webpack'\n                }]\n            }, {\n                dir: 'dist/style',\n                test: /\\.html$/,\n                rules: [{\n                    search: /version/ig,\n                    replace: '1.0.0'\n                },{\n                    search: '@title',\n                    replace: function(match){\n\n                    }\n                }]\n            },{\n                dir: 'dist/style',\n                test: [/\\.css$/, /\\.txt/],\n                rules: [{\n                    search: /version/ig,\n                    replace: '1.0.0'\n                },{\n                    search: '@title',\n                    replace: 'webpack'\n                }]\n            }])\n        ]\n    };\n```\n\nConfiguration\n=============\n\nYou can pass an array of configuration options to `ReplaceInFileWebpackPlugin`. Each configuration has following items:\n\n- `dir`: Optional. Base dir to find the files, if not provided, use the root of webpack context.\n- `files`: Optional. Files in `dir` to find for replacement.\n- `test`: Optional. Regex expression or Regex expressions array to match files in `dir`.\n- `rules`: Required. Replace content rules array. Each rule has `search` and `replace` properties.\n- `search`: Required. String or Regex expression used for searching content in files.\n- `replace`: Required. String or funcion used for replacing the searching content.\n\n# License\n\nThis project is licensed under [MIT](https://github.com/oyslin/replace-in-file-webpack-plugin/blob/master/LICENSE).\n","maintainers":[{"name":"waouyang","email":"oyslin@163.com"}],"time":{"modified":"2022-05-15T19:25:13.406Z","created":"2017-09-14T07:14:36.535Z","1.0.0":"2017-09-14T07:14:36.535Z","1.0.1":"2018-03-02T03:28:33.971Z","1.0.2":"2018-03-02T10:01:04.696Z","1.0.3":"2018-03-02T10:46:35.902Z","1.0.4":"2018-03-02T16:31:26.191Z","1.0.5":"2018-03-05T05:52:00.304Z","1.0.6":"2018-05-17T07:15:52.380Z"},"homepage":"https://github.com/oyslin/replace-in-file-webpack-plugin#readme","keywords":["webpack","plugin","replace","file"],"repository":{"type":"git","url":"git+https://github.com/oyslin/replace-in-file-webpack-plugin.git"},"author":{"name":"Walt Ouyang","email":"oyslin@163.com"},"bugs":{"url":"https://github.com/oyslin/replace-in-file-webpack-plugin/issues"},"license":"MIT","readmeFilename":"README.md","users":{"nmccready":true}}