tscoverage/ts/npmts.promisechain.ts

53 lines
2.2 KiB
TypeScript
Raw Normal View History

2016-09-06 15:33:28 +00:00
import plugins = require('./npmts.plugins')
2016-09-06 15:21:25 +00:00
import {Ora} from 'beautylog'
2016-03-14 03:32:52 +00:00
2016-10-02 18:35:13 +00:00
import * as q from 'q'
2016-09-06 15:33:28 +00:00
export let npmtsOra = new Ora('setting up TaskChain','cyan')
2016-05-17 00:32:40 +00:00
2016-09-22 21:23:16 +00:00
import * as NpmtsAssets from './npmts.assets'
import * as NpmtsCheck from './npmts.check'
import * as NpmtsClean from './npmts.clean'
import * as NpmtsCompile from './npmts.compile'
import * as NpmtsTypeDoc from './npmts.typedoc'
import * as NpmtsOptions from './npmts.options'
import * as NpmtsTests from './npmts.tests'
import * as NpmtsWatch from './npmts.watch'
2016-03-14 03:32:52 +00:00
2016-09-22 21:23:16 +00:00
export let run = function(argvArg){
2016-10-02 18:35:13 +00:00
let done = q.defer()
2016-09-06 15:21:25 +00:00
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)
2016-09-22 21:23:16 +00:00
.then(NpmtsWatch.run)
2016-03-12 10:09:54 +00:00
.then(function(configArg){
2016-09-06 15:21:25 +00:00
let 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'
if (process.env.CI) {
2016-09-06 15:33:28 +00:00
console.log(shipString)
2016-09-06 15:21:25 +00:00
plugins.beautylog.success('READY TO SHIP!')
2016-03-26 16:35:55 +00:00
} else {
2016-09-06 15:21:25 +00:00
plugins.beautylog.success('Done!')
2016-03-14 03:32:52 +00:00
}
2016-09-22 21:23:16 +00:00
done.resolve(configArg)
2016-09-06 15:33:28 +00:00
})
2016-09-06 15:21:25 +00:00
return done.promise
2016-09-06 15:33:28 +00:00
}