tscoverage/ts/mod00/mod00.compile.ts

24 lines
826 B
TypeScript
Raw Normal View History

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