forked from dalelotts/angular-bootstrap-datetimepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
49 lines (40 loc) · 1.05 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
/*globals require, __dirname */
/* jshint node:true */
'use strict';
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var karma = require('karma').server;
var bump = require('gulp-bump');
var plato = require('gulp-plato');
var karmaConfig = __dirname + '/karma.conf.js';
var paths = require('./paths');
gulp.task('bump', function () {
return gulp.src(paths.bump)
.pipe(bump())
.pipe(gulp.dest('./'));
});
gulp.task('complexity', function () {
return gulp.src('src/**/*.js')
.pipe(plato('complexity'));
});
gulp.task('test', function (done) {
karma.start({
configFile: karmaConfig,
singleRun: true,
reporters: ['progress', 'coverage', 'threshold']
}, done);
});
gulp.task('tdd', function (done) {
gulp.watch(paths.all, ['lint']);
karma.start({
configFile: paths.karmaConfig
}, done);
});
gulp.task('lint', function () {
return gulp
.src(paths.lint)
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
});
gulp.task('default', ['lint', 'complexity', 'test']);