1.1.0 • Published 4 years ago

gulp-js-decache v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

gulp-js-decache Build Status

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