aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Bacon Darwin2014-02-15 20:46:30 +0000
committerPeter Bacon Darwin2014-02-16 19:03:44 +0000
commitc6f406f03b53cb6948afdd4720e54b134e463650 (patch)
tree44d5f0c73cb43362483ad15171f7a07d66acc150
parentc663b39826b942292b09bc48b11da146a65c3792 (diff)
downloadangular.js-c6f406f03b53cb6948afdd4720e54b134e463650.tar.bz2
chore(doc-gen): add jshint checking to examples and tests
-rw-r--r--docs/gulpfile.js11
-rw-r--r--package.json6
2 files changed, 14 insertions, 3 deletions
diff --git a/docs/gulpfile.js b/docs/gulpfile.js
index de1c5053..124e2348 100644
--- a/docs/gulpfile.js
+++ b/docs/gulpfile.js
@@ -1,5 +1,6 @@
var gulp = require('gulp');
var concat = require('gulp-concat');
+var jshint = require('gulp-jshint');
var bower = require('bower');
var docGenerator = require('dgeni');
var merge = require('event-stream').merge;
@@ -38,7 +39,15 @@ gulp.task('doc-gen', function() {
return docGenerator('docs.config.js').generateDocs();
});
+// JSHint the example and protractor test files
+gulp.task('jshint', ['doc-gen'], function() {
+ gulp.src([outputFolder + '/ptore2e/**/*.js', outputFolder + '/examples/**/*.js'])
+ .pipe(jshint())
+ .pipe(jshint.reporter('jshint-stylish'))
+ .pipe(jshint.reporter('fail'));
+});
+
// The default task that will be run if no task is supplied
-gulp.task('default', ['assets', 'doc-gen', 'build-app']);
+gulp.task('default', ['assets', 'doc-gen', 'build-app', 'jshint']);
diff --git a/package.json b/package.json
index 7696c7a1..39af88c2 100644
--- a/package.json
+++ b/package.json
@@ -50,8 +50,10 @@
"gulp-concat": "~2.1.7",
"canonical-path": "0.0.2",
"winston": "~0.7.2",
- "dgeni": "~0.0",
- "dgeni-packages": "~0.0"
+ "dgeni": "*",
+ "dgeni-packages": "*",
+ "gulp-jshint": "~1.4.2",
+ "jshint-stylish": "~0.1.5"
},
"licenses": [
{