kache-buster
v1.0.3
Published
cache busting gulp package
Downloads
4
Maintainers
Readme
kache-buster
Usage
- MD5 of static content file
var kacheBuster = require('kache-buster');
gulp.task('myTask', function() {
return gulp.src('web/**/*.html')
.pipe(kacheBuster({ versionType: "MD5", sourceDir : "/test"}))
.pipe(gulp.dest('./tmp'));
});
- Timestamp
var kacheBuster = require('kache-buster');
gulp.task('myTask', function() {
return gulp.src('web/**/*.html')
.pipe(kacheBuster({ versionType: "timestamp"}))
.pipe(gulp.dest('./tmp'));
});
- Custom
var kacheBuster = require('kache-buster');
gulp.task('myTask', function() {
return gulp.src('web/**/*.html')
.pipe(kacheBuster({ versionType: "custom", customVersion:"someVersion"}))
.pipe(gulp.dest('./tmp'));
});
var kacheBuster = require('kache-buster');
gulp.task('myTask', function() {
return gulp.src('web/**/*.html')
.pipe(kacheBuster({ versionType: "custom", customVersion:function(){return "someversion";}}))
.pipe(gulp.dest('./tmp'));
});