Skip to content

Instantly share code, notes, and snippets.

@mattparlane
Created March 28, 2014 03:11
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 mattparlane/9824481 to your computer and use it in GitHub Desktop.
Save mattparlane/9824481 to your computer and use it in GitHub Desktop.
gulpfile.js
var gulp = require('gulp'),
gutil = require('gulp-util'),
coffee = require('gulp-coffee'),
yaml = require('./js/gulp/regen-yaml.js');
var paths = {
coffee: ['coffee/**/*.coffee', 'coffee/**/*.litcoffee'],
yaml: ['structure.yaml', 'language-strings.yaml'],
};
gulp.task('coffee', function() {
return gulp.src(paths.coffee)
.pipe(coffee({header: true}).on('error', gutil.log).on('error', gutil.beep))
.pipe(gulp.dest('js'));
});
gulp.task('yaml', function() {
return gulp.src(paths.yaml)
.pipe(yaml().on('error', gutil.log).on('error', gutil.beep))
.pipe(gulp.dest('.'));
});
gulp.task('watch', function() {
gulp.watch(paths.coffee, ['coffee']);
gulp.watch(paths.yaml, ['yaml']);
});
gulp.task('default', ['watch']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment