forked from nicolashery/example-d3-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
33 lines (26 loc) · 665 Bytes
/
gulpfile.js
File metadata and controls
33 lines (26 loc) · 665 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
var gulp = require('gulp');
var react = require('gulp-react');
var jshint = require('gulp-jshint');
var jsFiles = [
'src/**/*.js',
'build.js',
'gulpfile.js',
'webpack.config.js',
'webpack.config.prod.js'
];
gulp.task('jshint', function(cb) {
var stream = gulp.src(jsFiles)
.pipe(react())
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
if (process.env.CI) {
stream = stream.pipe(jshint.reporter('fail'));
}
stream.on('end', cb);
});
gulp.task('jshint-watch', ['jshint'], function(cb){
gulp.watch(jsFiles, ['jshint']);
cb();
console.log('Watching files for changes...');
});
gulp.task('default', ['jshint']);