cachebuster with a function to update references in the sources (useful for requirejs dependencies)
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-bushcaster --save-dev
The "bushcaster" task
In your project's Gruntfile, add a section named
bushcaster to the data object passed into
Length of the hash to be added.
Should we removed the source files?
Are we processing requirejs modules? Some internal processing relies on this variable.
Function to transform the updated reference (in case you need to change path? url?)
Globbing pattern for files that sould not be processed with updated references. Useful for libs, like jquery, or so - might speed up the whole process a bit.
Function to handle the hash map, so you can write the output to json or sth ;-)
- support reading the config from requirejs config
- more sophisticated testing
- lots'more afaik...
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.
- 0.1.0 2014-11-12 long awaited PR from @rodikal (&co.) fixing the tricky hashing inception :-)
- 0.0.7 2013-11-22 fixed error with map / files objects not being purged for more than one task
- 0.0.6 2013-11-06 tweaked the way the requirejs references processing work ...oh, and docs
- 0.0.5 2013-10-30 erm... docs fix
- 0.0.4 2013-10-30 further cleaning, fixed keywords, improved docs, added a proper license
- 0.0.3 2013-10-28 added first batch of tests, cleaned up
- 0.0.2 2013-10-28 added support for
- 0.0.1 2013-10-28 ported requirejs-cachebuster task and renamed to bushcaster