gulp-rev-custom
v1.0.3
Published
Static asset revisioning by appending content hash to filenames: unicorn.css => unicorn.css?v=d41d8cd98f
Downloads
19
Maintainers
Readme
gulp-rev-custom
gulp-rev 是基于 gulp-rev & gulp-rev-collector改造,将hash 值置于文件后,避免生成多个的文件,同时封装rev-collector, 无需安装两个依赖。
Install
$ npm install --save-dev gulp-rev-custom
Usage
const gulp = require('gulp');
const rev = require('gulp-rev-custom');
const { revCollector } = rev;
gulp.task('default', () =>
gulp.src('src/*.css')
.pipe(rev())
.pipe(rev.manifest({ merge: true }))
.pipe(gulp.dest('dist'))
);
// or
gulp.task('default', () =>
gulp.src('src/*.html')
.pipe(revCollector({
replaceReved: true,
}))
.pipe(gulp.dest('dist'))
);