Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 9f51f91

Browse files
author
Nick Litwin
committed
Add gulpfile
1 parent 170bdef commit 9f51f91

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

gulpfile.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
var gulp = require('gulp');
2+
var jshint = require('gulp-jshint');
3+
var jscs = require('gulp-jscs');
4+
var util = require('gulp-util');
5+
var gulpprint = require('gulp-print');
6+
7+
gulp.task('vet', function() {
8+
log('Analyzing source with JSHint and JSCS');
9+
10+
return gulp
11+
.src([
12+
'./app/**/*.js',
13+
'./*.js'
14+
])
15+
.pipe(gulpif(args.verbose, gulpprint()))
16+
.pipe(jscs())
17+
.pipe(jshint())
18+
.pipe(jshint.reporter('jshint-stylish', {verbose: true}))
19+
.pipe(jshint.reporter('fail'));
20+
});
21+
22+
23+
//////////////
24+
25+
function log(msg) {
26+
if (typeof(msg) === 'object') {
27+
for (var item in msg) {
28+
if (msg.hasOwnProperty(item)) {
29+
util.log(util.colors.blue(msg[item]));
30+
}
31+
}
32+
} else {
33+
util.log(util.colors.blue(msg));
34+
}
35+
}
36+
37+

0 commit comments

Comments
 (0)