tscoverage/ts/npmts.compile.ts

22 lines
773 B
TypeScript
Raw Normal View History

2016-09-06 15:21:25 +00:00
import 'typings-global'
import plugins = require('./npmts.plugins')
import paths = require('./npmts.paths')
import {npmtsOra} from './npmts.promisechain'
2016-06-07 06:49:22 +00:00
export let run = function (configArg) {
2016-09-22 21:23:16 +00:00
let done = plugins.q.defer()
2016-09-06 15:21:25 +00:00
let config = configArg
npmtsOra.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-18 11:08:31 +00:00
return plugins.tsn.compileGlobStringObject(config.testTs)
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)
})
return done.promise
}