1.0.2 • Published 8 years ago

gulp-rev-updated v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

gulp-rev-updated

use gulp-rev to filter out the updated files by compare with old manifest.json file

install

npm install gulp-rev-updated

use for

Oneday you have a.png and b.png, and you already use gulp-rev to generate their rev-manifest.json and tiny them for min.But You change a.png cause it's redesigned!So you only want to tiny a.png not b.png.

example

cd test and run node index.js

you can change test/*.js and run index.js again to see what happend or logs

var updated = require('../index');
var gulp = require('gulp');
var through = require('through2');
var rev = require('gulp-rev');
var revDel = require('rev-del');
var path = require('path')

var log = through.obj(function (file, enc, cb) {
  console.log(file.path)
  cb(null, file)
});

gulp.src('./files/*.js')
  .pipe(rev())
  .pipe(updated('./files/dist')))
  .pipe(log)
  .pipe(gulp.dest('./files/dist'))
  .pipe(rev.manifest())
  .pipe(revDel({ dest: './files/dist' }))
  .pipe(gulp.dest('./files/dist'))
1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago