-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
51 lines (36 loc) · 1.12 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Generated by CoffeeScript 1.8.0
(function() {
var clean, coffee, coffeePipes, coffeelint, gulp, gutil, mocha, watch;
gulp = require('gulp');
gutil = require('gulp-util');
coffee = require('gulp-coffee');
mocha = require('gulp-mocha');
clean = require('gulp-clean');
watch = require('gulp-watch');
watch = require('gulp-watch');
coffeelint = require('gulp-coffeelint');
require('coffee-script/register');
gulp.task('default', ['mocha']);
gulp.task('clean', function() {
return gulp.src('node_modules', {
read: false
}).pipe(clean());
});
coffeePipes = function(pipe) {
return pipe.pipe(coffeelint()).pipe(coffeelint.reporter()).pipe(coffee({
bare: true
}).pipe(mocha({
reporter: process.env.MOCHA_REPORTER || 'dot'
})).on('error', function() {
return this.emit('end');
}));
};
gulp.task('mocha', function() {
return coffeePipes(gulp.src('spec/*.coffee'));
});
gulp.task('watch', function() {
return gulp.src(['src/**/*.coffee', 'spec/*.coffee']).pipe(watch(function(files) {
return coffeePipes(files);
}));
});
}).call(this);