2016-03-12 10:21:16 +01:00
|
|
|
"use strict";
|
2017-02-27 22:19:14 +01:00
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2017-01-18 00:58:09 +01:00
|
|
|
const q = require("smartq");
|
2016-10-21 17:48:52 +02:00
|
|
|
const paths = require("../npmts.paths");
|
2017-11-28 17:33:55 +01:00
|
|
|
const plugins = require("./mod.plugins");
|
2016-06-07 08:49:22 +02:00
|
|
|
exports.run = function (configArg) {
|
2016-10-02 20:35:13 +02:00
|
|
|
let done = q.defer();
|
2016-09-22 23:23:16 +02:00
|
|
|
let config = configArg;
|
2017-03-31 19:18:18 +02:00
|
|
|
plugins.beautylog.ora.text('now compiling ' + 'TypeScript');
|
2016-09-18 13:08:31 +02:00
|
|
|
plugins.tsn.compileGlobStringObject(config.ts, config.tsOptions, paths.cwd)
|
2016-09-22 23:23:16 +02:00
|
|
|
.then(() => {
|
2017-03-04 20:49:10 +00:00
|
|
|
plugins.beautylog.ok(`compiled the module's TypeScript!`);
|
2016-07-01 02:28:34 +02:00
|
|
|
done.resolve(config);
|
2016-09-29 00:19:46 +02:00
|
|
|
}).catch(err => { console.log(err); });
|
2016-02-20 00:53:23 +01:00
|
|
|
return done.promise;
|
|
|
|
};
|