-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
30 lines (21 loc) · 763 Bytes
/
gulpfile.js
File metadata and controls
30 lines (21 loc) · 763 Bytes
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
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var jasmine = require('gulp-jasmine');
// *******************************************
gulp.task('jshint', function(){
return gulp.src(['src/**/*.js', 'tests/**/*.js'])
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('jasmine', function () {
return gulp.src('src/tests/**/*.js')
// gulp-jasmine works on filepaths so you can't have any plugins before it
.pipe(jasmine());
});
gulp.task('test', ['jasmine', 'jshint']);
// ***************************************
gulp.task('watch', function () {
gulp.watch('src/**/*.js', ['test']);
});
// *******************************************
gulp.task('default', ['test', 'watch']);