grunt-gitnewer
Run Grunt tasks with only those source files modified since the last git commit.
It's very like grunt-newer, but for git commit.
Usage
gitnewer
task
The The most common use case. If some files changed from last git commit, and exactly match with one or more task, then those tasks will run with only those files.
grunt; grunt;grunt; grunt;
gitnewer-prefix
task
The The only differece from gitnewer
task is gitnewer-prefix
uses prefix match, this is useful when src of task is a list of directories.
Options
branch
='HEAD', diffFilter
='ACM'
Internally, the following command is executed to detect changed files from some git commit:
git diff ${branch} --name-only --diff-filter=${diffFilter}
branch
and diffFilter
can be configured to meet your needs.