pokemon-showdown/gulpfile.js
Brian Chen bdede3b5b0 Change gulpfile to take advantage of gulp APIs
Gulp's `gulp.src` can also take an [array of globs](https://github.com/gulpjs/gulp/blob/master/docs/API.md), which makes iterating through all the directories manually rather redundant.
2014-04-16 00:12:04 -07:00

30 lines
702 B
JavaScript

var gulp = require('gulp'),
jshintStylish = require('jshint-stylish'),
gutil = require('gulp-util'),// Currently unused, but gulp strongly suggested I install...
jshint = require('gulp-jshint'),
jsHintOptions = {
"trailing": true,
"nonbsp": true,
"noarg": true,
"latedef": true,
"sub": true,
"smarttabs": true,
"evil": true,
"esnext": true,
"node": true,
"eqeqeq": false
};
gulp.task('lint', function() {
var directories = ['./*.js', './data/*.js', './mods/*.js', './config/*.js'];
console.log("\n\n*** Linting JavaScript Files ***\n\n");
gulp.src(directories)
.pipe(jshint(jsHintOptions))
.pipe(jshint.reporter(jshintStylish));
});
gulp.task('default', ['lint']);