-
-
Save gembin/eaac96bbbf8bc35b4bfa to your computer and use it in GitHub Desktop.
gulp-rev-all mockup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var rev = require('gulp-rev-all'); | |
var css = require('gulp-minify-css'); | |
var img = require('gulp-imagemin'); | |
var rs = require('run-sequence'); | |
var del = require('del'); | |
gulp.task('image', function () { | |
return gulp.src('image.jpeg') | |
.pipe(img({ progressive: false })) | |
.pipe(gulp.dest('tmp')); | |
}); | |
gulp.task('css', function () { | |
return gulp.src('test.css') | |
.pipe(css()) | |
.pipe(gulp.dest('tmp')); | |
}); | |
gulp.task('rev', ['image', 'css'], function () { | |
return gulp.src('tmp/**') | |
.pipe(rev()) | |
.pipe(gulp.dest('dist')); | |
}); | |
gulp.task('clean', function (cb) { | |
del('dist/**', cb); | |
}); | |
gulp.task('finish', function (cb) { | |
del('tmp/**', cb); | |
}); | |
gulp.task('start', function () { | |
rs('clean', 'rev', 'finish'); | |
}); | |
gulp.task('default', ['start']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment