tscoverage/ts/mod_compile/index.ts

28 lines
876 B
TypeScript
Raw Normal View History

2017-11-28 16:33:55 +00:00
/* ------------------------------------------
* This module compiles the module's TypeScript files
* Note: Test files are only compiled in memory
* -------------------------------------------- */
import * as q from 'smartq';
2017-11-28 16:33:55 +00:00
import { INpmtsConfig } from '../npmts.config';
2017-11-28 16:33:55 +00:00
import * as plugins from './mod.plugins';
2017-11-28 16:33:55 +00:00
import * as NpmtsAssets from './mod.assets';
import * as NpmtsCheck from './mod.check';
import * as NpmtsClean from './mod.clean';
import * as NpmtsCompile from './mod.compile';
2017-11-28 16:33:55 +00:00
export let run = function(configArg: INpmtsConfig): Promise<INpmtsConfig> {
let done = q.defer<INpmtsConfig>();
plugins.beautylog.ora.text('starting TypeScript Compilation');
2017-11-28 16:33:55 +00:00
NpmtsClean.run(configArg)
.then(NpmtsCheck.run)
.then(NpmtsCompile.run)
.then(NpmtsAssets.run)
.then(function() {
done.resolve(configArg);
});
return done.promise;
};