-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
61 lines (56 loc) · 1.12 KB
/
gulpfile.js
File metadata and controls
61 lines (56 loc) · 1.12 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
'use strict';
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var mocha = require('gulp-mocha');
var opts = {
'extends': 'eslint:recommended',
'ecmaFeatures': {
'modules': true
},
'rules': {
'no-alert': 0,
'no-bitwise': 0,
'camelcase': 1,
'no-console': 1,
'curly': 1,
'eqeqeq': 0,
'no-eq-null': 0,
'guard-for-in': 1,
'no-empty': 1,
'no-use-before-define': 0,
'no-obj-calls': 2,
'no-unused-vars': 0,
'new-cap': 1,
'no-shadow': 0,
'strict': 1,
'no-invalid-regexp': 2,
'comma-dangle': 2,
'no-undef': 1,
'no-new': 1,
'no-extra-semi': 1,
'no-debugger': 2,
'no-caller': 1,
'semi': 1,
'quotes': 0,
'no-unreachable': 2
},
'globals': {
'$': false
},
'env': {
'node': true,
'es6': true
}
};
gulp.task('default', ['test','lint'], () => {
});
gulp.task('test', () => {
gulp.src(__dirname + '/test/test.js')
.pipe(mocha());
});
gulp.task('lint', () => {
gulp.src(__dirname + '/**.js')
.pipe(eslint(opts))
.pipe(eslint.format());
});
gulp.watch(__dirname + '/**/**.js',['test','lint']);