forked from temmihoo/plushie-badname
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
40 lines (31 loc) · 975 Bytes
/
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
'use strict';
let gulp = require('gulp');
let jshint = require('gulp-jshint');
let mocha = require('gulp-mocha');
let sources = {
js: '**/*.js'
}
gulp.task('default', ['watch']);
// gulp.task('scripts', function() {
// gulp.src(sources.js)
// .pipe(gulp.dest('dist'));
// });
gulp.task ('jshint', function() {
return gulp.src(sources.js)
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('validateCalendar', function(){
return gulp.src('unit_test_calendar.js', {read: false})
.pipe(mocha({reporter: 'spec', bail: true, timeout: 10000}))
.on('error', console.log)
});
gulp.task('unit-test', function(){
return gulp.src('test/unit-*.js', {read: false})
.pipe(mocha({reporter: 'spec', bail: true, timeout: 10000}))
.on('error', console.log)
});
gulp.task('watch', function() {
gulp.watch(sources.js, ['jshint']);
//gulp.watch('**/*.json', ['validateEvents'])
});