Skip to content

Instantly share code, notes, and snippets.

@chodorowicz
Created November 21, 2014 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chodorowicz/1c28d1a7b820b145b94c to your computer and use it in GitHub Desktop.
Save chodorowicz/1c28d1a7b820b145b94c to your computer and use it in GitHub Desktop.
gulp pipe sharing using lazypipe
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var coffee = require('gulp-coffee');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var lazypipe = require('lazypipe');
// give lazypipe
var jsTransform = lazypipe()
.pipe(jshint)
.pipe(jshint.reporter, stylish)
.pipe(uglify);
gulp.task('bootstrap', function() {
return gulp.src('bootstrap/js/*.js')
.pipe(jsTransform())
.pipe(gulp.dest('public/bootstrap'));
});
gulp.task('coffee', function() {
return gulp.src('lib/js/*.coffee')
.pipe(coffee())
.pipe(jsTransform())
.pipe(gulp.dest('public/js'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment