Created
December 18, 2015 19:09
-
-
Save edwinestrada/6177f48f16efdb4d6b50 to your computer and use it in GitHub Desktop.
WIP gulp file for snapsnip api
This file contains 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 gulp = require('gulp'); | |
var mocha = require('gulp-mocha'); | |
var shell = require('gulp-shell'); | |
var coffee = require('gulp-coffee'); | |
var runSequence = require('run-sequence'); | |
gulp.task('monitor-coffee-files', function() { | |
return gulp.watch(['lib/api/**/*.coffee'], ['clear-terminal', 'run-tests']); | |
}); | |
gulp.task('clear-terminal', shell.task([ | |
'clear' | |
])); | |
gulp.task('run-tests', function() { | |
return gulp | |
.src(['**/*.spec.coffee']) | |
.pipe(coffee()) | |
// .pipe(coffee({bare: true}) | |
.pipe(gulp.dest('.')) | |
.pipe(mocha({reporter: 'spec'})); | |
}); | |
gulp.task('monitor-js-files', function() { | |
return gulp.watch(['lib/api/v1/**/*.js'], ['jsdoc', 'run-tests']); | |
}); | |
gulp.task('jsdoc', shell.task([ | |
'jsdoc lib/api/v1/users/users.js' | |
])); | |
gulp.task('default', function(done) { | |
runSequence( | |
[ | |
'monitor-coffee-files', | |
'monitor-js-files' | |
], | |
done | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment