Created
January 24, 2014 04:37
-
-
Save steida/8592161 to your computer and use it in GitHub Desktop.
Gulp.js, keep the original folder structure, for side by side compilation.
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 coffee = require('gulp-coffee'); | |
var eventStream = require('event-stream'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var scriptsDirs = [ | |
'bower_components/este-library/este/', | |
'client/', | |
'server/' | |
]; | |
gulp.task('coffee', function() { | |
var streams = scriptsDirs.map(function(dir) { | |
return gulp.src(dir + '**/*.coffee') | |
.pipe(coffee().on('error', gutil.log)) | |
.pipe(gulp.dest(dir)) | |
}); | |
return eventStream.concat.apply(eventStream, streams); | |
}); |
++ This was great thank you for posting!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Even better: