Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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