-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
27 lines (23 loc) · 756 Bytes
/
Copy pathgulpfile.js
File metadata and controls
27 lines (23 loc) · 756 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
// grab our packages
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
jscs = require('gulp-jscs'),
stylish = require('gulp-jscs-stylish');
// define the default task and add the watch task to it
gulp.task('default', ['watch']);
// configure the jshint task
gulp.task('jshint', function () {
return gulp.src('app/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
// configure the jscs task with airbnb preset
gulp.task('jscs', function () {
return gulp.src('app/**/*.js')
.pipe(jscs())
.pipe(stylish());
});
// configure which files to watch and what tasks to use on file changes
gulp.task('watch', function () {
gulp.watch('app/**/*.js', ['jshint', 'jscs']);
});