replace-in-file
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -20,6 +20,10 @@ #!/usr/bin/env node | ||
const to = argv._.shift(); | ||
const files = argv._.shift().split(','); | ||
//Single star globs already get expanded in the command line | ||
const files = argv._.reduce((files, file) => { | ||
return files.concat(file.split(',')); | ||
}, []); | ||
//Log | ||
console.log(`Replacing '${from}' with '${to}' in ${files}`); | ||
console.log(`Replacing '${from}' with '${to}'`); | ||
@@ -26,0 +30,0 @@ //Create options |
{ | ||
"name": "replace-in-file", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "A simple utility to quickly replace text in one or more files.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/adamreisnz/replace-in-file#readme", |
@@ -101,5 +101,7 @@ # Replace in file | ||
The options `allowEmptyPaths` and `encoding` are supported in the CLI as well. | ||
The options `allowEmptyPaths` and `encoding` are supported in the CLI. | ||
In addition, the CLI supports the `verbose` option to list the changed files. | ||
Multiple files or globs can be replaced by providing a comma separated list. | ||
## License | ||
@@ -106,0 +108,0 @@ (MIT License) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
126265
891
110
0