Finds all local image urls in your JS files and adds cachebusting parameters to them.
npm install gulp-js-decache> Finds all local image urls in your JS files and adds cachebusting parameters to them.
```
$ npm install --save-dev gulp-js-decache
`js
var gulp = require('gulp');
var decache = require('gulp-js-decache');
gulp.task('decache', function() {
return gulp.src(['js/*.js'])
.pipe(decache({ base : './public/', md5: true, ignore: [/regexToMatchURIsToSkip/] }))
.pipe(gulp.dest('./public'));
});
``
It is best to run this on already processed and minified files with all of the optimizations applied.
MIT © Max Degterev