gulp-recache
静态文件缓存控制更新
Last updated 2 years ago by rodey .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-recache 
SYNC missed versions from official npm registry.

gulp-recache

Features

  • 缓存控制更新
  • 在地址后面加上文件hash值来更新缓存

Usage


var gulp        = require('gulp'),
    watch       = require('gulp-watch'),
    reCache     = require('gulp-recache');

gulp.task('build.cache', function(){

    gulp.src('src/**/*')
        .pipe(reCache({
            //query的key值
            queryKey: '_rvc_',
            queryVal: '@hash',
            hashSize: 10,
            // toBase64_QK: '_tobase64',
            toBase64Limit: 1000,
            basePath: 'D:/Sites/GitHub/me/gulp-recache/example'
        }))
        .pipe(gulp.dest('dist'));

});

Options

+ queryKey      :query的key值,默认 '_rvc_'
+ queryVal      :地址后面的query值,默认 '@hash'(填充文件MD5值)
+ hashSize      :生成的hash长度
+ toBase64_QK   :可以在uri后面带上需要转为base64的query key, 默认 '_tobase64'
+ toBase64Limit : 限制转base64的图片大小,默认为1000(字节)
+ basePath      :资源根路径

#License ISC

Current Tags

  • 1.0.8                                ...           latest (2 years ago)

12 Versions

  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 0.0.9                                ...           4 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (3)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |