2016-05-25 05:23:48 +02:00
|
|
|
import "typings-global";
|
2016-03-12 11:09:54 +01:00
|
|
|
import plugins = require("./npmts.plugins");
|
2016-07-01 02:28:34 +02:00
|
|
|
import {Ora} from "beautylog"
|
2016-03-14 04:32:52 +01:00
|
|
|
|
2016-05-17 02:32:40 +02:00
|
|
|
export let npmtsOra = new plugins.beautylog.Ora("setting up TaskChain","cyan");
|
|
|
|
|
2016-03-14 04:32:52 +01:00
|
|
|
import NpmtsAssets = require("./npmts.assets");
|
2016-03-21 01:07:34 +01:00
|
|
|
import NpmtsClean = require("./npmts.clean");
|
2016-03-14 04:32:52 +01:00
|
|
|
import NpmtsCompile = require("./npmts.compile");
|
2016-02-20 00:53:23 +01:00
|
|
|
import NpmtsConfigFile = require("./npmts.configfile");
|
2016-07-15 00:38:41 +02:00
|
|
|
import NpmtsTypeDoc = require("./npmts.typedoc");
|
2016-03-14 04:32:52 +01:00
|
|
|
import NpmtsOptions = require("./npmts.options");
|
2016-02-20 00:53:23 +01:00
|
|
|
import NpmtsTests = require("./npmts.tests");
|
2016-03-14 04:32:52 +01:00
|
|
|
|
2016-06-16 03:02:33 +02:00
|
|
|
export let promisechain = function(argvArg){
|
2016-05-19 18:42:23 +02:00
|
|
|
let done = plugins.Q.defer();
|
2016-06-10 06:14:12 +02:00
|
|
|
npmtsOra.start();
|
2016-06-16 03:02:33 +02:00
|
|
|
NpmtsConfigFile.run(argvArg)
|
2016-02-20 00:53:23 +01:00
|
|
|
.then(NpmtsOptions.run)
|
2016-03-21 01:07:34 +01:00
|
|
|
.then(NpmtsClean.run)
|
2016-02-20 00:53:23 +01:00
|
|
|
.then(NpmtsCompile.run)
|
2016-03-14 04:32:52 +01:00
|
|
|
.then(NpmtsAssets.run)
|
2016-07-15 00:38:41 +02:00
|
|
|
.then(NpmtsTypeDoc.run)
|
2016-03-12 11:09:54 +01:00
|
|
|
.then(NpmtsTests.run)
|
|
|
|
.then(function(configArg){
|
|
|
|
let shipString = "" +
|
|
|
|
"\n" +
|
|
|
|
"\n" +
|
|
|
|
" # # ( )\n" +
|
|
|
|
" ___#_#___|__\n" +
|
|
|
|
" _ |____________| _\n" +
|
|
|
|
" _=====| | | | | |==== _\n" +
|
|
|
|
" =====| |.---------------------------. | |====\n" +
|
|
|
|
" <--------------------' . . . . . . . . '--------------/\n" +
|
|
|
|
" \\ /\n" +
|
|
|
|
" \\___________________________________________________________/\n" +
|
|
|
|
" wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n" +
|
|
|
|
" wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n" +
|
|
|
|
" wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n"
|
2016-03-14 04:32:52 +01:00
|
|
|
if (process.env.CI){
|
|
|
|
console.log(shipString);
|
|
|
|
plugins.beautylog.success("READY TO SHIP!");
|
2016-03-26 17:35:55 +01:00
|
|
|
} else {
|
2016-05-19 22:11:18 +02:00
|
|
|
plugins.beautylog.success("Done!");
|
2016-03-14 04:32:52 +01:00
|
|
|
}
|
2016-05-19 18:42:23 +02:00
|
|
|
done.resolve();
|
2016-03-12 11:09:54 +01:00
|
|
|
});
|
2016-05-19 18:42:23 +02:00
|
|
|
return done.promise;
|
2016-02-20 00:53:23 +01:00
|
|
|
};
|