@idlebox/node-ignore-edit
v0.0.14
Published
api for modify .*ignore files
Downloads
48
Readme
Structured Ignore Files
library to parse/modify ignore files like this:
### dist files
/dist
### packages
node_modules
### logs
*.log
### temp folders
temp/
/generated-files
*.temp
import { loadFile, saveFile } from '@idlebox/node-ignore-edit';
const content = loadFile('.gitignore');
content.packages.push('jspm_packages');
content['new section'].push('some/folder');
content['temp folders'].delete('temp/');
content['temp folders'].push('!wanted.temp');
saveFile(content);