promisechain now returns promise

This commit is contained in:
Philipp Kunz 2016-05-19 18:36:53 +02:00
parent 659907d280
commit e297be6fc2
2 changed files with 4 additions and 6 deletions

View File

@ -1,11 +1,11 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
console.log("**** starting NPMTS ****"); console.log("**** starting NPMTS ****");
import plugins = require("./npmts.plugins"); import * as plugins from "./npmts.plugins"
import promisechain = require("./npmts.promisechain"); import {promisechain} from "./npmts.promisechain";
plugins.beautylog.figletSync("NPMTS"); plugins.beautylog.figletSync("NPMTS");
try { try {
promisechain.run(); promisechain();
} }
catch(err){ catch(err){
console.log(err); console.log(err);

View File

@ -14,8 +14,7 @@ import NpmtsOptions = require("./npmts.options");
import NpmtsPublish = require("./npmts.publish"); import NpmtsPublish = require("./npmts.publish");
import NpmtsTests = require("./npmts.tests"); import NpmtsTests = require("./npmts.tests");
export var run = function(){ export var promisechain = function(){
var promisechain;
NpmtsConfigFile.run() NpmtsConfigFile.run()
.then(NpmtsOptions.run) .then(NpmtsOptions.run)
.then(NpmtsClean.run) .then(NpmtsClean.run)
@ -49,5 +48,4 @@ export var run = function(){
} }
}); });
return promisechain;
}; };