2016-03-12 09:21:16 +00:00
|
|
|
"use strict";
|
2016-09-14 11:16:36 +00:00
|
|
|
require("typings-global");
|
|
|
|
var plugins = require("./npmts.plugins");
|
2016-09-18 11:08:31 +00:00
|
|
|
var paths = require("./npmts.paths");
|
2016-09-14 11:16:36 +00:00
|
|
|
var npmts_promisechain_1 = require("./npmts.promisechain");
|
2016-06-07 06:49:22 +00:00
|
|
|
exports.run = function (configArg) {
|
|
|
|
var done = plugins.Q.defer();
|
|
|
|
var config = configArg;
|
2016-09-06 15:21:25 +00:00
|
|
|
npmts_promisechain_1.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(function () {
|
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!');
|
2016-07-01 00:28:34 +00:00
|
|
|
done.resolve(config);
|
2016-02-19 23:53:23 +00:00
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|