2018-04-08 23:03:39 +00:00
|
|
|
import * as q from 'smartq';
|
2016-10-02 18:35:13 +00:00
|
|
|
|
2018-04-08 23:03:39 +00:00
|
|
|
import * as paths from '../npmts.paths';
|
2016-10-21 15:48:52 +00:00
|
|
|
|
2018-04-08 23:03:39 +00:00
|
|
|
import * as plugins from './mod.plugins';
|
2016-04-30 03:49:53 +00:00
|
|
|
|
2018-04-08 23:03:39 +00:00
|
|
|
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(() => {
|
2018-04-08 23:03:39 +00:00
|
|
|
plugins.beautylog.ok(`compiled the module's TypeScript!`);
|
|
|
|
done.resolve(config);
|
|
|
|
})
|
|
|
|
.catch(err => {
|
|
|
|
console.log(err);
|
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|