-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
38 lines (32 loc) · 957 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
'use strict';
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var karma = require('karma').server;
var files = ['app.js',
'public/app/app.js',
'public/app/exercise/*.js',
'public/app/workout/*.js',
'public/app/login/*.js',
'public/app/services/*.js',
'public/app/signup/*.js',
'public/app/user/*.js'];
gulp.task('default',['lint','test']);
gulp.task('lint', function() {
return gulp.src(files).
pipe(jshint()).
pipe(jshint.reporter('jshint-stylish'), {verbose:true});
});
gulp.task('test', function(done) {
karma.start({
configFile: __dirname + '/karma.conf.js',
singleRun:true
}, done);
});
gulp.task('tdd', function(done) {
karma.start({
configFile: __dirname + '/karma.conf.js'
}, done);
});
gulp.task('watch', function() {
gulp.watch(files, ['lint', 'test']);
});