tscoverage/dist/npmts.promisechain.js

49 lines
2.1 KiB
JavaScript
Raw Normal View History

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