diff --git a/index.d.ts b/index.d.ts index 42d79ce..c76a55e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -6,7 +6,6 @@ declare module NpmtsPlugins { gulp: any; g: { coveralls: any; - if: any; insert: any; istanbul: any; mocha: any; @@ -44,7 +43,6 @@ declare var plugins: { gulp: any; g: { coveralls: any; - if: any; insert: any; istanbul: any; mocha: any; diff --git a/index.js b/index.js index 0b5137f..b69281f 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,6 @@ var NpmtsPlugins; gulp: require("gulp"), g: { coveralls: require("gulp-coveralls"), - if: require("gulp-if"), insert: require("gulp-insert"), istanbul: require("gulp-istanbul"), mocha: require("gulp-mocha"), @@ -209,15 +208,20 @@ var NpmtsTests; return stream; }; var coveralls = function () { - var stream = plugins.gulp.src("./coverage/**/lcov.info") - .pipe(plugins.g.if((process.env.TRAVIS && config.coveralls), plugins.g.coveralls())); + var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "./coverage/lcov.info")]) + .pipe(plugins.g.coveralls()); return stream; }; istanbul().on("finish", function () { mocha().on("finish", function () { - coveralls().on("finish", function () { + if (process.env.TRAVIS && config.coveralls) { + coveralls().on("finish", function () { + done.resolve(config); + }); + } + else { done.resolve(config); - }); + } }); }); return done.promise; diff --git a/package.json b/package.json index 26caeb4..432b79f 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "fs-extra": "^0.26.5", "gulp": "3.9.0", "gulp-coveralls": "^0.1.4", - "gulp-if": "^2.0.0", "gulp-insert": "0.5.0", "gulp-istanbul": "^0.10.3", "gulp-mocha": "^2.2.0", diff --git a/test/assets/coverage/lcov-report/assets/index.html b/test/assets/coverage/lcov-report/assets/index.html index 1817bf5..71c5ed1 100644 --- a/test/assets/coverage/lcov-report/assets/index.html +++ b/test/assets/coverage/lcov-report/assets/index.html @@ -77,7 +77,7 @@
diff --git a/test/assets/coverage/lcov-report/assets/index.js.html b/test/assets/coverage/lcov-report/assets/index.js.html index c90e333..430aa1d 100644 --- a/test/assets/coverage/lcov-report/assets/index.js.html +++ b/test/assets/coverage/lcov-report/assets/index.js.html @@ -76,7 +76,7 @@ module.exports = testplugin; diff --git a/test/assets/coverage/lcov-report/index.html b/test/assets/coverage/lcov-report/index.html index 44c4782..0d2e722 100644 --- a/test/assets/coverage/lcov-report/index.html +++ b/test/assets/coverage/lcov-report/index.html @@ -77,7 +77,7 @@ diff --git a/ts/npmts.plugins.ts b/ts/npmts.plugins.ts index 1245da3..661c8b7 100644 --- a/ts/npmts.plugins.ts +++ b/ts/npmts.plugins.ts @@ -7,7 +7,6 @@ module NpmtsPlugins { gulp: require("gulp"), g: { coveralls: require("gulp-coveralls"), - if: require("gulp-if"), insert: require("gulp-insert"), istanbul: require("gulp-istanbul"), mocha: require("gulp-mocha"), diff --git a/ts/npmts.tests.ts b/ts/npmts.tests.ts index 271a387..b9463d4 100644 --- a/ts/npmts.tests.ts +++ b/ts/npmts.tests.ts @@ -23,19 +23,20 @@ module NpmtsTests { }; var coveralls = function(){ - var stream = plugins.gulp.src("./coverage/**/lcov.info") - .pipe(plugins.g.if( - (process.env.TRAVIS && config.coveralls), - plugins.g.coveralls() - )); + var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"./coverage/lcov.info")]) + .pipe(plugins.g.coveralls()); return stream; }; istanbul().on("finish",function(){ mocha().on("finish",function(){ - coveralls().on("finish",function(){ + if(process.env.TRAVIS && config.coveralls){ + coveralls().on("finish",function(){ + done.resolve(config); + }) + } else { done.resolve(config); - }) + } }) }); return done.promise;