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";
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
var console = new private_import_core_1.Console();
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