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