1.0.9 • Published 1 year ago

replacecontent v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

description

  • rename files content in current directory
  • support regular expression

install

npm install replacecontent -g

two usages

  • change before to after of the files in current directory

Passing parameters through the command line

replacecontent  "before" "after"
  • change before to
replacecontent  "before"
  • change some-aaa-bbb-ext to some-ext of the files in current directory
replacecontent  "/-(.+?)-(.+?)/"

Passing parameters through configuration files

  1. Add a replace.json file in current directory
{
  "before": "after"
}

2.Then execute command in current directory

replacecontent;

example

replacecontent "/\/\/#\ssourceMappingURL=.+.map/"