jamesknelson / gulp-rev-replace

Rewrite occurences of filenames which have been renamed by gulp-rev
MIT License
388 stars 62 forks source link

I just find a new method to use gulp-rev-replace without gulp-useref #42

Open chshouyu opened 9 years ago

chshouyu commented 9 years ago
var rev = require("gulp-rev");
var addsrc = require('gulp-add-src');
var revReplace = require("gulp-rev-replace");
gulp.task("revision", ["dist:css", "dist:js"], function(){
  return gulp.src(["dist/**/*.css", "dist/**/*.js"])
    .pipe(rev())
    .pipe(addsrc('./*.html'))
    .pipe(revReplace())
    .pipe(gulp.dest(opt.distFolder))
});

It is more simple.

jamesknelson commented 9 years ago

Thanks. If you were to create a PR with this in the README, I'd be happy to merge it.