[Build] Also lint specs

...with additional tolerance declared for Jasmine variables.
This commit is contained in:
Victor Woeltjen 2016-03-04 12:01:11 -08:00
parent 43176cfbb8
commit c7f199a59e
2 changed files with 11 additions and 4 deletions

View File

@ -35,7 +35,9 @@ var gulp = require('gulp'),
fs = require('fs'),
git = require('git-rev-sync'),
moment = require('moment'),
merge = require('merge-stream'),
project = require('./package.json'),
_ = require('lodash'),
paths = {
main: 'main.js',
dist: 'dist',
@ -122,10 +124,14 @@ gulp.task('stylesheets', function () {
gulp.task('lint', function () {
var nonspecs = paths.specs.map(function (glob) {
return "!" + glob;
});
return gulp.src(paths.scripts.concat(nonspecs))
.pipe(jshint(options.jshint))
return "!" + glob;
}),
scriptLint = gulp.src(paths.scripts.concat(nonspecs))
.pipe(jshint(options.jshint)),
specLint = gulp.src(paths.specs)
.pipe(jshint(_.extend({ jasmine: true }, options.jshint)));
return merge(scriptLint, specLint)
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});

View File

@ -34,6 +34,7 @@
"lodash": "^3.10.1",
"markdown-toc": "^0.11.7",
"marked": "^0.3.5",
"merge-stream": "^1.0.0",
"mkdirp": "^0.5.1",
"moment": "^2.11.1",
"node-bourbon": "^4.2.3",