tscoverage/dist/mod_compile/mod.compile.js

21 lines
646 B
JavaScript
Raw Normal View History

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