-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
59 lines (54 loc) · 1.63 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
50
51
52
53
54
55
56
57
58
59
'use strict';
const gulp = require('gulp');
const jasmine = require('gulp-jasmine');
const eslint = require('gulp-eslint');
const sequence = require('run-sequence');
gulp.task('lint', function () {
return gulp.src(['**/*.js','*.js','!node_modules/**'])
.pipe(eslint(
{
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"semi": 2,
"valid-jsdoc": 1,
"block-scoped-var" : 2,
"eqeqeq" : 2,
"no-invalid-this" : 2,
"no-multi-spaces" : 2,
"no-unmodified-loop-condition" : 2,
"no-unused-expressions" : 1,
"no-unused-labels" : 2,
"no-shadow" : 2,
"no-unused-vars" : 1,
"arrow-spacing" : 2,
"no-var" : 2
}
}
))
.pipe(eslint.format())
// To have the process exit with an error code (1) on
// lint error, return the stream and pipe to failAfterError last.
.pipe(eslint.failAfterError());
});
gulp.task('searchresulttest', () => {
return gulp.src('spec/SearchResultSpec.js')
.pipe(jasmine());
});
gulp.task('bottest', () => {
return gulp.src('spec/BotSpec.js')
.pipe(jasmine());
});
gulp.task('default', (callback) => {
sequence(
'lint',
'bottest',
'searchresulttest',
callback
);
});