From e3be4f298fd266027a7ba45867b8847e810d2c9d Mon Sep 17 00:00:00 2001 From: Ivan Vlasenko Date: Thu, 9 Apr 2015 14:36:04 +0300 Subject: [PATCH] Added gulp-watch for auto testing and linting --- gulpfile.js | 5 +++++ package.json | 1 + 2 files changed, 6 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 0888868..5f2ee4c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,4 +1,5 @@ var gulp = require('gulp'); +var watch = require('gulp-watch'); gulp.task('lint', function () { var jshint = require('gulp-jshint'); @@ -13,4 +14,8 @@ gulp.task('test', function () { return gulp.src('test/*.js', { read: false }).pipe(mocha()); }); +gulp.task('watch', function() { + gulp.watch('**/*.js', ['default']); +}); + gulp.task('default', ['lint', 'test']); diff --git a/package.json b/package.json index 1a6699b..1fb1de3 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "dependencies": { "color": "^0.8.0", "postcss": "^4.0.3", + "gulp-watch": "^4.2.4", "postcss-message-helpers": "^2.0.0" }, "devDependencies": {