add coveralls config option
This commit is contained in:
parent
13c9c96cc6
commit
3f9194f344
2
index.d.ts
vendored
2
index.d.ts
vendored
@ -34,7 +34,7 @@ declare module NpmtsCompile {
|
||||
var run: (configArg: any) => any;
|
||||
}
|
||||
declare module NpmtsTests {
|
||||
var run: () => any;
|
||||
var run: (configArg: any) => any;
|
||||
}
|
||||
declare module NpmtsPromisechain {
|
||||
var init: () => any;
|
||||
|
8
index.js
8
index.js
@ -77,6 +77,9 @@ var NpmtsOptions;
|
||||
NpmtsOptions.run = function (configArg) {
|
||||
var done = plugins.q.defer();
|
||||
var config = configArg;
|
||||
if (typeof config.coveralls === "undefined") {
|
||||
config.coveralls = true;
|
||||
}
|
||||
if (config.mode == "default") {
|
||||
config.typings = [
|
||||
"./ts/"
|
||||
@ -190,8 +193,9 @@ var NpmtsCompile;
|
||||
/// <reference path="./index.ts" />
|
||||
var NpmtsTests;
|
||||
(function (NpmtsTests) {
|
||||
NpmtsTests.run = function () {
|
||||
NpmtsTests.run = function (configArg) {
|
||||
var done = plugins.q.defer();
|
||||
var config = configArg;
|
||||
plugins.gulp.task('istanbul', function () {
|
||||
return plugins.gulp.src([plugins.path.join(paths.cwd, "index.js")])
|
||||
.pipe(plugins.g.istanbul())
|
||||
@ -205,7 +209,7 @@ var NpmtsTests;
|
||||
});
|
||||
plugins.gulp.task("coveralls", function () {
|
||||
return plugins.gulp.src('coverage/**/lcov.info')
|
||||
.pipe(plugins.g.if(process.env.TRAVIS, plugins.g.coveralls()));
|
||||
.pipe(plugins.g.if((process.env.TRAVIS && config.coveralls), plugins.g.coveralls()));
|
||||
});
|
||||
plugins.gulp.task("test", function () {
|
||||
plugins.g.sequence("istanbul", "mocha", "coveralls", function () {
|
||||
|
@ -77,7 +77,7 @@
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 09 2016 05:39:17 GMT+0100 (CET)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 09 2016 05:46:38 GMT+0100 (CET)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
|
@ -76,7 +76,7 @@ module.exports = testplugin;
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 09 2016 05:39:17 GMT+0100 (CET)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 09 2016 05:46:38 GMT+0100 (CET)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
|
@ -77,7 +77,7 @@
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 09 2016 05:39:17 GMT+0100 (CET)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 09 2016 05:46:38 GMT+0100 (CET)
|
||||
</div>
|
||||
</div>
|
||||
<script src="prettify.js"></script>
|
||||
|
@ -8,5 +8,6 @@
|
||||
"./subts1/",
|
||||
"./subts2/",
|
||||
"./customdir"
|
||||
]
|
||||
],
|
||||
"coveralls":"false"
|
||||
}
|
@ -3,6 +3,9 @@ module NpmtsOptions {
|
||||
export var run = function(configArg){
|
||||
var done = plugins.q.defer();
|
||||
var config = configArg;
|
||||
if (typeof config.coveralls === "undefined"){
|
||||
config.coveralls = true;
|
||||
}
|
||||
if (config.mode == "default"){
|
||||
config.typings = [
|
||||
"./ts/"
|
||||
|
@ -1,8 +1,8 @@
|
||||
/// <reference path="./index.ts" />
|
||||
module NpmtsTests {
|
||||
export var run = function() {
|
||||
export var run = function(configArg) {
|
||||
var done = plugins.q.defer();
|
||||
|
||||
var config = configArg;
|
||||
plugins.gulp.task('istanbul', function () {
|
||||
return plugins.gulp.src([plugins.path.join(paths.cwd,"index.js")])
|
||||
// Covering files
|
||||
@ -23,7 +23,7 @@ module NpmtsTests {
|
||||
plugins.gulp.task("coveralls",function(){
|
||||
return plugins.gulp.src('coverage/**/lcov.info')
|
||||
.pipe(plugins.g.if(
|
||||
process.env.TRAVIS,
|
||||
(process.env.TRAVIS && config.coveralls),
|
||||
plugins.g.coveralls()
|
||||
));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user