1.0.5 • Published 5 years ago
clean-gitignore v1.0.5
clean-gitignore
A command to remove all files and folders which match pattern in gitignore.
CLI
clean-git [options]
Options
You can print this infos with npx clean-git -h
Usage: npx clean-git [options]
remove files which match pattern in gitignore.
Options:
-h, --help Print this help menu.
-p, --path Specify a path (current path by default).
-k, --keep-modules keep node_modules folder.
-v, --verbose Print more informations.
-r, --recursive Acte recursively.
-i, --ignores Add path to ignores.
example
you may usually want keep node_modules folder and make clean recursivly.
clean-git -k -r
Node.js API
const cleanGit = require("clean-gitignore")
cleanGit(dirname, options) // return promise<null>
Arguments
- dirname
{string}
the folder to clean - options
{object}
options.ignores{string[]}
files to ignores options.recursive{boolean}
* options.verbose{boolean}
print informations.