0.6.8 • Published 4 years ago
@nrademacher/file-ops-cli v0.6.8
File Ops CLI
A basic Node.js CLI app for common file operations.
Included so far:
- Find and replace
- Prepending
- Appending
Installation
Project-specific usage
npm install @nrademacher/file-ops-cliGlobal usage
npm install -g @nrademacher/file-ops-cliUsage
file-ops op=<op> <args> <file>Note: Globbed file specifications (e.g. *.js or src/**/*.js) must be in quotes to prevent automatic glob expansion.
Find and replace
file-ops fnr '<old>' '<new>' <flags> '<file>'--silent,-s- Will not log individual processed files to console
Prepend
file-ops prepend '<text>' <flags> '<file>'Flags
--silent,-s- Will not log individual processed files to console
--unique,-u- Will skip file if file already includes input string
Append
file-ops append '<text>' <flags> '<file>'Flags
--silent,-s- Will not log individual processed files to console
--unique,-u- Will skip file if file already includes input string
TODO
- Add better and prettier logging
- Add quality-of-life CLI features
--helpflag
- Add more operations
- Write tests