gulp-js-decache

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i gulp-js-decache

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

6.33 kB

Total Files

4

Last publish

Collaborators

  • suprmax