Skip to content

Instantly share code, notes, and snippets.

@j03m
Forked from steida/gist:8592161
Last active August 29, 2015 14:25
Show Gist options
  • Save j03m/309e49bb9fa13e628609 to your computer and use it in GitHub Desktop.
Save j03m/309e49bb9fa13e628609 to your computer and use it in GitHub Desktop.
Gulp.js, keep the original folder structure, for side by side compilation.
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);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment