Run tasks only if target file changed.
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-diff --save-dev
The "diff" task
This task will keep a hash reference of target file and run defined tasks only if file changed. Similar to grunt-contrib-watch, but this one is for deployment.
File hashes will be saved in
You might like to add
.grunt to your
You can flush file hashes any time by running:
algorithm is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are
'sha512', etc. On recent releases,
openssl list-message-digest-algorithms will display the available digest algorithms.
The file encoding.
targets are passed to
diff task in the same order they are written in
Thus allows chained configuration.
- Improve test coverage
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
- 2014-02-10 v0.1.5 Skip non-file paths
- 2014-02-10 v0.1.3 Default refer tasks
- 2014-02-10 v0.1.2 Refer to task:target's files
- 2014-02-10 v0.1.1 Check file removal
- 2014-02-10 v0.1.0 Release