-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgulpfile.js
36 lines (29 loc) · 921 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
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var jasmine = require('gulp-jasmine');
var jsPaths = {
path: ['server/**/*.js', 'client/js/**/*.js', 'tessel/**/*.js', 'mobile/www/js/**/*.js', 'test/**/*.js']
};
// checks js files with jshint
gulp.task('lint', function() {
// return gulp.src('server/**/*.js')
return gulp.src(jsPaths.path)
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
// checks js files for jscs styles
gulp.task('checkStyle', function() {
// return gulp.src('./**/*.js')
return gulp.src(jsPaths.path)
.pipe(jscs({
preset: 'google',
requireCamelCaseOrUpperCaseIdentifiers: null,
maximumLineLength: { value: 100 }
}));
});
// watch files for changes
// gulp.task('watch', function() {
// gulp.watch('src/**/*.js', ['lint', 'checkStyle']);
// });
gulp.task('default', ['lint', 'checkStyle']);