Skip to content

Commit

Permalink
gulp fixes
Browse files Browse the repository at this point in the history
`jslint` works now, added `watch` for continuous `jslint`+`build` on file changes.
  • Loading branch information
compwright committed Nov 15, 2016
1 parent 9efd067 commit 6c1c925
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"node": true,
"unused": true,
"predef": [ "require", "module" ]
}
9 changes: 8 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ var gulp = require('gulp'),
browserify = require('browserify'),
streamify = require('gulp-streamify'),
source = require('vinyl-source-stream'),
merge = require('merge-stream');
merge = require('merge-stream'),
watch = require('gulp-watch');

var srcDir = './src/';
var outDir = './';
Expand All @@ -31,6 +32,7 @@ var header = "/*!\n\
gulp.task('build', buildTask);
gulp.task('bump', bumpTask);
gulp.task('jshint', jshintTask);
gulp.task('watch', watchTask);

function buildTask() {
var nonBundled = browserify('./src/chart.annotation.js')
Expand Down Expand Up @@ -86,3 +88,8 @@ function jshintTask() {
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
}

function watchTask() {
buildTask();
gulp.watch('src/*.js', ['jshint', 'build']);
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
"gulp-streamify": "^1.0.2",
"gulp-uglify": "^1.5.3",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.3.10",
"inquirer": "^1.0.2",
"jshint": "^2.9.2",
"jshint-stylish": "^2.2.1",
"merge-stream": "^1.0.0",
"semver": "^5.1.0",
"vinyl-source-stream": "^1.1.0"
Expand Down

0 comments on commit 6c1c925

Please sign in to comment.