UNPKG

810 BJavaScriptView Raw
1#!/usr/bin/env node
2"use strict";
3require('reflect-metadata');
4var tsc = require('@angular/tsc-wrapped');
5var codegen_1 = require('./codegen');
6function codegen(ngOptions, cliOptions, program, host) {
7 return codegen_1.CodeGenerator.create(ngOptions, cliOptions, program, host).codegen({
8 transitiveModules: true
9 });
10}
11// CLI entry point
12if (require.main === module) {
13 var args = require('minimist')(process.argv.slice(2));
14 var project = args.p || args.project || '.';
15 var cliOptions = new tsc.NgcCliOptions(args);
16 tsc.main(project, cliOptions, codegen).then(function (exitCode) { return process.exit(exitCode); }).catch(function (e) {
17 console.error(e.stack);
18 console.error('Compilation failed');
19 process.exit(1);
20 });
21}
22//# sourceMappingURL=main.js.map
\No newline at end of file