1.2.0 • Published 7 years ago

novonity-file-replace v1.2.0

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

novonity-file-replace

Installation

$ npm i novonity-file-replace

CLI

replace is a command line utility for replace the javascript object file, the javascript object format is dictionaries,the file is generally system configuration file For example:

file-replace -f dist/config.js -p "[{'k':'debug','v':false}]" -r
file-replace -f dist/config.js -p "[{'k':'debug','v':false},{'k':'document_input_dir','v':'d:/court/documents/input'}]" -r

***attension*** 
1. '-p' parameter cannot contain blank charset
2. if 'v' contain '$' charset, need to append '\\' charset  to '$' charset; 
for example:
file-replace -f dist/config.js -p "[{'k':'debug','v':false},{'k':'debug','v':'\\${output_dir}'}]" -r

options include

  • -f which file would be modified
  • -p this is array and inner object format is dictionaries,the content of V will be the value of replacing value of k
  • -r whether to replace ' into "
1.2.0

7 years ago

1.1.0

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago