-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgulpfile.js
More file actions
36 lines (30 loc) · 1.04 KB
/
gulpfile.js
File metadata and controls
36 lines (30 loc) · 1.04 KB
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
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var jasmine = require('gulp-jasmine');
gulp.task('lint', ['jshint', 'jscs']);
gulp.task('jshint', function() {
return gulp.src('./lib/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});
gulp.task('jscs', function() {
return gulp.src('./lib/**/*.js')
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jshint.reporter('fail'));
});
gulp.task('jasmine-backend', function () {
return gulp.src('./spec/backend/**/*-spec.js')
.pipe(jasmine());
});
// Marking the front end tests as dependant on the backend tests
// prevents an issue that jasmine has with running two lots in
// parallel
gulp.task('jasmine-frontend', ['jasmine-backend'], function () {
return gulp.src('./spec/frontend/**/*-spec.js')
.pipe(jasmine());
});
gulp.task('default', ['lint', 'jasmine-backend']);
gulp.task('everything', ['lint', 'jasmine-backend', 'jasmine-frontend']);