forked from MobileChromeApps/mobile-chrome-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
35 lines (31 loc) · 828 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
var gulp = require("gulp");
var gutil = require("gulp-util");
var jshint = require('gulp-jshint');
var mocha = require('gulp-mocha');
gulp.task('lint', function() {
return gulp.src([
'src/**/*.js',
// 'tests/**/*.js',
])
.pipe(jshint({})) // Using .jshintrc file for configuration.
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});
gulp.task('test', function() {
return gulp.src(['tests/**/*.js'])
.pipe(mocha({
reporter: 'spec', //'nyan'
ui: 'bdd',
}))
.on('error', function(err) {
throw err; // Make sure failed tests cause gulp to exit non-zero
});
});
gulp.task('watch', [], function() {
gulp.watch([
'src/**/*.js',
'tests/**/*.js',
], ['lint', 'test']);
});
gulp.task('default', ['lint', 'test'], function() {
});