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'
|
|
|
|
|
2017-11-28 16:33:55 +00:00
|
|
|
import * as plugins from './mod.plugins'
|
2016-04-30 03:49:53 +00:00
|
|
|
|
2016-06-07 06:49:22 +00:00
|
|
|
export let run = function (configArg) {
|
2017-03-04 20:49:10 +00:00
|
|
|
let done = q.defer()
|
|
|
|
let config = configArg
|
2017-03-31 17:18:18 +00:00
|
|
|
plugins.beautylog.ora.text('now compiling ' + 'TypeScript')
|
2017-03-04 20:49:10 +00:00
|
|
|
plugins.tsn.compileGlobStringObject(config.ts, config.tsOptions, paths.cwd)
|
|
|
|
.then(() => {
|
|
|
|
plugins.beautylog.ok(`compiled the module's TypeScript!`)
|
|
|
|
done.resolve(config)
|
|
|
|
}).catch(err => { console.log(err) })
|
|
|
|
return done.promise
|
2016-09-06 15:21:25 +00:00
|
|
|
}
|