gulp-js-decache
v1.1.0
Published
Finds all local image urls in your JS files and adds cachebusting parameters to them.
Downloads
18
Maintainers
Readme
gulp-js-decache
Finds all local image urls in your JS files and adds cachebusting parameters to them.
Install
$ npm install --save-dev gulp-js-decache
Usage
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.
License
MIT © Max Degterev