1 | #!/usr/bin/env node
|
2 | "use strict";
|
3 | require('reflect-metadata');
|
4 | var tsc = require('@angular/tsc-wrapped');
|
5 | var codegen_1 = require('./codegen');
|
6 | function codegen(ngOptions, cliOptions, program, host) {
|
7 | return codegen_1.CodeGenerator.create(ngOptions, cliOptions, program, host).codegen({
|
8 | transitiveModules: true
|
9 | });
|
10 | }
|
11 |
|
12 | if (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 |
|
\ | No newline at end of file |