项目作者: miclay

项目描述 :
gulp插件,给HTML中的静态资源url加随机参数以突破缓存
高级语言: HTML
项目地址: git://github.com/miclay/gulp-anti-cache.git
创建时间: 2016-06-17T08:22:38Z
项目社区:https://github.com/miclay/gulp-anti-cache

开源协议:MIT License

下载


gulp-anti-cache

Using query strings to negate the effect of chche.

Installation

  1. $ npm install gulp-anti-cache --save-dev

Usage

  1. var gulp = require('gulp');
  2. var nocache = require('gulp-anti-cache');

default usage:

  1. gulp.task('nocache', function() {
  2. gulp.src('src/*.html')
  3. .pipe(nocache())
  4. .pipe(gulp.dest('dest/'));
  5. });

with params usage:

  1. gulp.task('nocache', function() {
  2. gulp.src('src/*.html')
  3. .pipe(nocache({
  4. stampKeyName: 'customkey'
  5. }))
  6. .pipe(gulp.dest('dest/'));
  7. });