-
Notifications
You must be signed in to change notification settings - Fork 12
/
gulpfile.js
35 lines (28 loc) · 1016 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
'use strict';
var gulp = require('gulp-help')(require('gulp'));
var jasmine = require('gulp-jasmine');
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var seq = require('gulp-sequence');
require('gulp-release-tasks')(gulp);
gulp.task('test', function () {
return gulp.src(['test/**/*.spec.js'])
.pipe(jasmine({
reporter: new SpecReporter()
}));
});
gulp.task('jscs', function() {
return gulp.src(['./src/**/*.js', './test/**/*.js', '!./test/fixtures/**/*.js', './*.js'])
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'));
});
gulp.task('jshint', function() {
return gulp.src(['./src/**/*.js', './test/**/*.js', '!./test/fixtures/**/*.js', './*.js'])
.pipe(jshint())
.pipe(jshint.reporter())
.pipe(jshint.reporter('fail'));
});
gulp.task('lint', seq('jshint', 'jscs'));
gulp.task('ci', seq('lint', 'test'));