-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
39 lines (35 loc) · 850 Bytes
/
gulpfile.js
File metadata and controls
39 lines (35 loc) · 850 Bytes
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
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var mocha = require('gulp-mocha');
var files = ['**/*.js', '!node_modules/**'];
gulp.task('eslint', function() {
return gulp.src(files)
.pipe(eslint({
'rules': {
'indent': [2, 2],
'quotes': [2, 'single'],
'semi': [2, 'always'],
'no-console': 0,
'no-path-concat': 0,
'operator-assignment': 0,
'no-inline-comments': 0,
'max-len': 0,
'curly': 0,
'quote-props': 0
},
'env': {
'es6': true,
'node': true,
'mocha': true
},
'extends': 'eslint:recommended'
}))
.pipe(eslint.format());
});
gulp.task('test', function() {
return gulp.src(['test/*.js'], {
read: false
})
.pipe(mocha());
});
gulp.task('default', ['eslint', 'test']);