Skip to content

Commit

Permalink
feat(jshint): add jshint to build chain
Browse files Browse the repository at this point in the history
  • Loading branch information
adamayres committed Jul 1, 2014
1 parent 8be7f7c commit decbf8f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/templates.js
10 changes: 10 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
//var wrap = require('gulp-wrap');
var templateCache = require('gulp-angular-templatecache');
var gjshint = require('gulp-jshint');
var stylish = require('jshint-stylish');

var port = gutil.env.port || 3000;
var covport = gutil.env.covport || 3001;
Expand Down Expand Up @@ -50,6 +52,8 @@ gulp.task('dist', ['tpl'], function () {
'src/mentio.service.js',
'dist/templates.js'
])
.pipe(gjshint())
.pipe(gjshint.reporter(stylish))
.pipe(concat('mentio.js'))
// // hack to make componentjs libs to work
// .pipe(wrap('(function () {\n\n\'use strict\';\n\nvar Package = \'\';' +
Expand All @@ -60,6 +64,12 @@ gulp.task('dist', ['tpl'], function () {
.pipe(gulp.dest('dist'));
});

gulp.task('jshint', function () {
return gulp.src('src/**/*.js')
.pipe(gjshint())
.pipe(gjshint.reporter(stylish));
});

gulp.task('tpl', function () {
return gulp.src('src/**/*.tpl.html')
.pipe(templateCache({
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
"gulp": "^3.6.2",
"gulp-angular-templatecache": "^1.2.1",
"gulp-concat": "^2.2.0",
"gulp-jshint": "^1.6.3",
"gulp-karma": "0.0.4",
"gulp-livereload": "^1.5.0",
"gulp-uglify": "^0.3.1",
"gulp-util": "^2.2.14",
"gulp-wrap": "^0.3.0",
"jasmine-reporters": "~0.4.1",
"jshint-stylish": "^0.2.0",
"karma": "^0.12.16",
"karma-chrome-launcher": "^0.1.2",
"karma-coverage": "~0.1.4",
Expand Down

0 comments on commit decbf8f

Please sign in to comment.