1.0.3 • Published 3 years ago
easy-replace-in-files v1.0.3
easy-replace-in-files
Simple tool for find and replace in files. Uses config file for files, from and to rules.
Install
npm install --save-dev easy-replace-in-filesExample
Create config file easy-replace-in-files.json
{
"easyReplaceInFiles": [
{
"files": "readme.txt",
"from": "Stable tag:\\s?(.+)",
"type": "regex",
"to": "Stable tag: $$npm_package_version$$"
}
]
}In package.json scripts
"scripts" : {
"version": "easy-replace-in-files",
}In the terminal, run
npm run version