[Pkg-javascript-commits] [node-mocks-http] 169/296: updated; added gulp lint task and removed open task

Thorsten Alteholz alteholz at moszumanska.debian.org
Mon Feb 8 18:13:33 UTC 2016


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository node-mocks-http.

commit ae5bc6b8d3d72d1137825ade12429cae46c5acf9
Author: Johnny Estilles <johnny.estilles at agentia.asia>
Date:   Wed Apr 8 08:46:08 2015 +0800

    updated; added gulp lint task and removed open task
---
 gulpfile.js | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/gulpfile.js b/gulpfile.js
index 3d3d86f..98a43b6 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -3,29 +3,36 @@
 var gulp = require('gulp');
 var mocha = require('gulp-mocha');
 var istanbul = require('gulp-istanbul');
-var open = require('gulp-open');
+var eslint = require('gulp-eslint');
 
-var src = {
-  lib: ['./lib/**/*.js'],
+var files = {
+  src: ['./lib/**/*.js'],
   test: ['./test/**/*.spec.js']
 };
 
+gulp.task('lint', function () {
+    return gulp.src(files.src.concat(files.test))
+      .pipe(eslint())
+      .pipe(eslint.format())
+      .pipe(eslint.failOnError());
+});
+
 gulp.task('test', function () {
-    return gulp.src(src.test, {read: false})
+    return gulp.src(files.test, {read: false})
       .pipe(mocha({reporter: 'dot'}));
 });
 
 gulp.task('spec', function () {
-    return gulp.src(src.test, {read: false})
+    return gulp.src(files.test, {read: false})
       .pipe(mocha({reporter: 'spec'}));
 });
 
 gulp.task('coverage', function (done) {
-    gulp.src(src.lib)
+    gulp.src(files.lib)
       .pipe(istanbul())
       .pipe(istanbul.hookRequire())
       .on('finish', function () {
-          gulp.src(src.test)
+          gulp.src(files.test)
               .pipe(mocha({reporter: 'dot'}))
               .pipe(istanbul.writeReports({
                   dir: './coverage',
@@ -35,8 +42,3 @@ gulp.task('coverage', function (done) {
               .on('end', done);
       });
 });
-
-gulp.task('open', function(){
-    gulp.src('./coverage/index.html')
-      .pipe(open('<%file.path%>'));
-});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-mocks-http.git



More information about the Pkg-javascript-commits mailing list