Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("reflect-metadata");
var tsc = require("@angular/tsc-wrapped");
var extractor_1 = require("./extractor");
function extract(ngOptions, cliOptions, program, host) {
return extractor_1.Extractor.create(ngOptions, program, host, cliOptions.locale)
.extract(cliOptions.i18nFormat, cliOptions.outFile);
}
// Entry point
if (require.main === module) {
var args = require('minimist')(process.argv.slice(2));
var project = args.p || args.project || '.';
var cliOptions = new tsc.I18nExtractionCliOptions(args);
tsc.main(project, cliOptions, extract, { noEmit: true })
.then(function (exitCode) { return process.exit(exitCode); })
.catch(function (e) {
console.error(e.stack);
console.error('Extraction failed');
process.exit(1);
});
}
//# sourceMappingURL=extract_i18n.js.map
var tmplParser = new private_import_compiler_1.TemplateParser(expressionParser, elementSchemaRegistry, htmlParser, console, []);
var resolver = new private_import_compiler_1.CompileMetadataResolver(new compiler.NgModuleResolver(staticReflector), new compiler.DirectiveResolver(staticReflector), new compiler.PipeResolver(staticReflector), elementSchemaRegistry, staticReflector);
var offlineCompiler = new compiler.OfflineCompiler(resolver, normalizer, tmplParser, new private_import_compiler_1.StyleCompiler(urlResolver), new private_import_compiler_1.ViewCompiler(config), new private_import_compiler_1.NgModuleCompiler(), new private_import_compiler_1.TypeScriptEmitter(reflectorHost), null, null);
// TODO(vicb): implicit tags & attributes
var messageBundle = new compiler.MessageBundle(htmlParser, [], {});
return new Extractor(program, compilerHost, staticReflector, messageBundle, reflectorHost, resolver, normalizer, offlineCompiler);
};
return Extractor;
}());
exports.Extractor = Extractor;
// Entry point
if (require.main === module) {
var args = require('minimist')(process.argv.slice(2));
var project = args.p || args.project || '.';
var cliOptions = new tsc.I18nExtractionCliOptions(args);
tsc.main(project, cliOptions, extract)
.then(function (exitCode) { return process.exit(exitCode); })
.catch(function (e) {
console.error(e.stack);
console.error('Extraction failed');
process.exit(1);
});
}
//# sourceMappingURL=extract_i18n.js.map
#!/usr/bin/env node
"use strict";
require('reflect-metadata');
var tsc = require('@angular/tsc-wrapped');
var codegen_1 = require('./codegen');
function codegen(ngOptions, cliOptions, program, host) {
return codegen_1.CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}
// CLI entry point
if (require.main === module) {
var args = require('minimist')(process.argv.slice(2));
var project = args.p || args.project || '.';
var cliOptions = new tsc.NgcCliOptions(args);
tsc.main(project, cliOptions, codegen).then(function (exitCode) { return process.exit(exitCode); }).catch(function (e) {
console.error(e.stack);
console.error('Compilation failed');
process.exit(1);
});
}
//# sourceMappingURL=main.js.map
import * as tsc from '@angular/tsc-wrapped';
import {CodeGenerator} from './codegen';
function codegen(
ngOptions: tsc.AngularCompilerOptions, cliOptions: tsc.NgcCliOptions, program: ts.Program,
host: ts.CompilerHost) {
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}
// CLI entry point
if (require.main === module) {
const args = require('minimist')(process.argv.slice(2));
const project = args.p || args.project || '.';
const cliOptions = new tsc.NgcCliOptions(args);
tsc.main(project, cliOptions, codegen).then(exitCode => process.exit(exitCode)).catch(e => {
console.error(e.stack);
console.error('Compilation failed');
process.exit(1);
});
}
default:
var htmlParser = new compiler.I18NHtmlParser(new compiler.HtmlParser());
ext = 'xlf';
serializer = new compiler.Xliff(htmlParser, compiler.DEFAULT_INTERPOLATION_CONFIG);
break;
}
var dstPath = path.join(ngOptions.genDir, "messages." + ext);
host.writeFile(dstPath, messageBundle.write(serializer), false);
});
}
// Entry point
if (require.main === module) {
var args = require('minimist')(process.argv.slice(2));
var project = args.p || args.project || '.';
var cliOptions = new tsc.I18nExtractionCliOptions(args);
tsc.main(project, cliOptions, extract)
.then(function (exitCode) { return process.exit(exitCode); })
.catch(function (e) {
console.error(e.stack);
console.error('Extraction failed');
process.exit(1);
});
}
//# sourceMappingURL=extract_i18n.js.map
#!/usr/bin/env node
"use strict";
require('reflect-metadata');
var tsc = require('@angular/tsc-wrapped');
var codegen_1 = require('./codegen');
function codegen(ngOptions, cliOptions, program, host) {
return codegen_1.CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}
// CLI entry point
if (require.main === module) {
var args = require('minimist')(process.argv.slice(2));
var project = args.p || args.project || '.';
var cliOptions = new tsc.NgcCliOptions(args);
tsc.main(project, cliOptions, codegen).then(function (exitCode) { return process.exit(exitCode); }).catch(function (e) {
console.error(e.stack);
console.error('Compilation failed');
process.exit(1);
});
}
//# sourceMappingURL=main.js.map
#!/usr/bin/env node
"use strict";
require('reflect-metadata');
var tsc = require('@angular/tsc-wrapped');
var extractor_1 = require('./extractor');
function extract(ngOptions, cliOptions, program, host) {
return extractor_1.Extractor.create(ngOptions, program, host).extract(cliOptions.i18nFormat);
}
// Entry point
if (require.main === module) {
var args = require('minimist')(process.argv.slice(2));
var project = args.p || args.project || '.';
var cliOptions = new tsc.I18nExtractionCliOptions(args);
tsc.main(project, cliOptions, extract)
.then(function (exitCode) { return process.exit(exitCode); })
.catch(function (e) {
console.error(e.stack);
console.error('Extraction failed');
process.exit(1);
});
}
//# sourceMappingURL=extract_i18n.js.map
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("reflect-metadata");
var tsc = require("@angular/tsc-wrapped");
var extractor_1 = require("./extractor");
function extract(ngOptions, cliOptions, program, host) {
return extractor_1.Extractor.create(ngOptions, program, host, cliOptions.locale)
.extract(cliOptions.i18nFormat, cliOptions.outFile);
}
// Entry point
if (require.main === module) {
var args = require('minimist')(process.argv.slice(2));
var project = args.p || args.project || '.';
var cliOptions = new tsc.I18nExtractionCliOptions(args);
tsc.main(project, cliOptions, extract, { noEmit: true })
.then(function (exitCode) { return process.exit(exitCode); })
.catch(function (e) {
console.error(e.stack);
console.error('Extraction failed');
process.exit(1);
});
}
//# sourceMappingURL=extract_i18n.js.map
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("reflect-metadata");
var tsc = require("@angular/tsc-wrapped");
var extractor_1 = require("./extractor");
function extract(ngOptions, cliOptions, program, host) {
return extractor_1.Extractor.create(ngOptions, program, host, cliOptions.locale)
.extract(cliOptions.i18nFormat, cliOptions.outFile);
}
// Entry point
if (require.main === module) {
var args = require('minimist')(process.argv.slice(2));
var project = args.p || args.project || '.';
var cliOptions = new tsc.I18nExtractionCliOptions(args);
tsc.main(project, cliOptions, extract, { noEmit: true })
.then(function (exitCode) { return process.exit(exitCode); })
.catch(function (e) {
console.error(e.stack);
console.error('Extraction failed');
process.exit(1);
});
}
//# sourceMappingURL=extract_i18n.js.map
case 'xlf':
default:
var htmlParser = new compiler.I18NHtmlParser(new compiler.HtmlParser());
ext = 'xlf';
serializer = new compiler.Xliff(htmlParser, compiler.DEFAULT_INTERPOLATION_CONFIG);
break;
}
var dstPath = path.join(ngOptions.genDir, "messages." + ext);
host.writeFile(dstPath, messageBundle.write(serializer), false);
});
}
// Entry point
if (require.main === module) {
var args = require('minimist')(process.argv.slice(2));
var project = args.p || args.project || '.';
var cliOptions = new tsc.I18nExtractionCliOptions(args);
tsc.main(project, cliOptions, extract)
.then(function (exitCode) { return process.exit(exitCode); })
.catch(function (e) {
console.error(e.stack);
console.error('Extraction failed');
process.exit(1);
});
}
//# sourceMappingURL=extract_i18n.js.map