1.0.0 • Published 9 years ago

gulp-gift-md5 v1.0.0

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

gulp-gift-md5

GiftTalk gulp static file md5 file

Usage

First, install gulp-gift-md5 as a development dependency:

npm install --save-dev gulp-gift-md5

Then, add it to your gulpfile.js:

var md5 = require("gulp-gift-md5");

gulp.src("./src/*.css")
	.pipe(md5(10,'./output/index.html'))
	.pipe(gulp.dest("./dist"));

md5 all css files in the src folder and change these css names in the quoted html--index.html

gulp.task('img', function() {  
  var imgSrc = './static/img/**',
    quoteSrc = './output/static/css/**/*.css', // [./output/static/css/**/*.css',./output/static/js/**/*.js']
    imgDst = './output/static/img';

   
  return gulp.src(imgSrc)    
    .pipe(imagemin())
    .pipe(md5(10, quoteSrc))    
    .pipe(gulp.dest(imgDst));
});

License

http://en.wikipedia.org/wiki/MIT_License[MIT License]