Skip to content

Instantly share code, notes, and snippets.

@balthazar
Created February 26, 2015 10:47
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save balthazar/47f9d23c4b3f2c68bc08 to your computer and use it in GitHub Desktop.
Save balthazar/47f9d23c4b3f2c68bc08 to your computer and use it in GitHub Desktop.
gulp-rev-all mockup
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