2017-01-17 23:58:09 +00:00
|
|
|
import * as q from 'smartq'
|
2016-10-02 18:35:13 +00:00
|
|
|
|
2016-10-21 15:48:52 +00:00
|
|
|
import * as paths from '../npmts.paths'
|
|
|
|
|
|
|
|
import * as plugins from './mod00.plugins'
|
2016-04-30 03:49:53 +00:00
|
|
|
|
2016-06-07 06:49:22 +00:00
|
|
|
export let run = function (configArg) {
|
2016-10-02 18:35:13 +00:00
|
|
|
let done = q.defer()
|
2016-09-06 15:21:25 +00:00
|
|
|
let config = configArg
|
2017-01-21 22:23:00 +00:00
|
|
|
plugins.beautylog.ora.text('now compiling ' + 'TypeScript'.yellow)
|
2016-09-18 11:08:31 +00:00
|
|
|
plugins.tsn.compileGlobStringObject(config.ts,config.tsOptions,paths.cwd)
|
2016-06-07 06:49:22 +00:00
|
|
|
.then(() => {
|
2016-09-06 15:21:25 +00:00
|
|
|
plugins.beautylog.ok('compiled main TypeScript!')
|
|
|
|
plugins.beautylog.log('now compiling tests!')
|
2016-09-28 22:19:46 +00:00
|
|
|
return plugins.tsn.compileGlobStringObject(config.testTs,config.tsOptions,paths.cwd)
|
2016-06-07 06:49:22 +00:00
|
|
|
})
|
|
|
|
.then(function () {
|
2016-09-06 15:21:25 +00:00
|
|
|
plugins.beautylog.ok('compiled all TypeScript!')
|
|
|
|
done.resolve(config)
|
2016-09-28 22:19:46 +00:00
|
|
|
}).catch(err => { console.log(err) })
|
2016-09-06 15:21:25 +00:00
|
|
|
return done.promise
|
|
|
|
}
|