tscoverage/ts/mod_compile/mod.compile.ts

22 lines
546 B
TypeScript
Raw Normal View History

import * as q from 'smartq';
2016-10-02 18:35:13 +00:00
import * as paths from '../npmts.paths';
2016-10-21 15:48:52 +00:00
import * as plugins from './mod.plugins';
export let run = function(configArg) {
let done = q.defer();
let config = configArg;
plugins.beautylog.ora.text('now compiling ' + 'TypeScript');
plugins.tsn
.compileGlobStringObject(config.ts, config.tsOptions, paths.cwd)
2017-03-04 20:49:10 +00:00
.then(() => {
plugins.beautylog.ok(`compiled the module's TypeScript!`);
done.resolve(config);
})
.catch(err => {
console.log(err);
});
return done.promise;
};