From 9989abf8787543e282353788fa10f4d22c7bf41b Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Sat, 10 Jan 2015 16:51:55 -0500 Subject: [PATCH] Fix jscs config, add gulp rules --- gulpfile.js | 18 ++++++++++++++++++ package.json | 6 +++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gulpfile.js diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..635bfc7 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,18 @@ +var gulp = require('gulp'); +var mocha = require('gulp-mocha'); +var config = require('./package.json'); +var jscs = require('gulp-jscs'); + +gulp.task('mocha', function() { + return gulp.src('./test/*'). + pipe(mocha({ reporter: 'dot' })); +}); + +gulp.task('jscs', function() { + return gulp.src('./index.js'). + pipe(jscs(config.jscsConfig)); +}); + +gulp.task('watch', function() { + gulp.watch('./index.js', ['jscs', 'mocha']); +}); diff --git a/package.json b/package.json index a338c87..08524dc 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,17 @@ }, "devDependencies": { "acquit": "0.0.3", + "gulp": "3.8.10", + "gulp-mocha": "2.0.0", + "gulp-jscs": "1.4.0", "istanbul": "0.3.5", "jscs": "1.9.0", "mocha": "2.0.0" }, "jscsConfig": { "preset": "airbnb", - "requireMultipleVarDecl": null + "requireMultipleVarDecl": null, + "disallowMultipleVarDecl": true }, "author": "Valeri Karpov ", "license": "Apache 2.0"