git-staged-filter-file-extension
get git staged files, and filter with file extension.
Install
npm install git-staged-filter-file-extension
Usage
;// multiple file extensions// const filterFile = new GitFilterFile("./", {ext: [".wow", ".txt"]}); filterFile.start .then
IFileStatus interface
API
GitStagedFilterFile(<.git path>, options)
- .git path: where your git repo lives.
- options: should pass a object, like below.
- ext: file extensions, could be string or string array. For example
.js
or['.js', '.jsx']
- pattern: this will pass to
grep
command as pattern, you can also passed as an array will be pass as arguments togrep
command.
- ext: file extensions, could be string or string array. For example