@angular/compiler-cli
Advanced tools
Comparing version 4.1.1 to 4.2.0-beta.0
{ | ||
"name": "@angular/compiler-cli", | ||
"version": "4.1.1", | ||
"version": "4.2.0-beta.0", | ||
"description": "Angular - the compiler CLI for Node.js", | ||
@@ -12,3 +12,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@angular/tsc-wrapped": "4.1.1", | ||
"@angular/tsc-wrapped": "4.2.0-beta.0", | ||
"reflect-metadata": "^0.1.2", | ||
@@ -19,4 +19,4 @@ "minimist": "^1.2.0" | ||
"typescript": "^2.0.2", | ||
"@angular/compiler": "4.1.1", | ||
"@angular/core": "4.1.1" | ||
"@angular/compiler": "4.2.0-beta.0", | ||
"@angular/core": "4.2.0-beta.0" | ||
}, | ||
@@ -23,0 +23,0 @@ "repository": { |
@@ -14,2 +14,3 @@ /** | ||
var compiler = require("@angular/compiler"); | ||
var core_1 = require("@angular/core"); | ||
var fs_1 = require("fs"); | ||
@@ -49,15 +50,29 @@ var compiler_host_1 = require("./compiler_host"); | ||
} | ||
var transFile = cliOptions.i18nFile; | ||
var locale = cliOptions.locale; | ||
var transContent = ''; | ||
if (transFile) { | ||
if (!locale) { | ||
throw new Error("The translation file (" + transFile + ") locale must be provided. Use the --locale option."); | ||
if (cliOptions.i18nFile) { | ||
if (!cliOptions.locale) { | ||
throw new Error("The translation file (" + cliOptions.i18nFile + ") locale must be provided. Use the --locale option."); | ||
} | ||
transContent = fs_1.readFileSync(transFile, 'utf8'); | ||
transContent = fs_1.readFileSync(cliOptions.i18nFile, 'utf8'); | ||
} | ||
var missingTranslation = core_1.MissingTranslationStrategy.Warning; | ||
if (cliOptions.missingTranslation) { | ||
switch (cliOptions.missingTranslation) { | ||
case 'error': | ||
missingTranslation = core_1.MissingTranslationStrategy.Error; | ||
break; | ||
case 'warning': | ||
missingTranslation = core_1.MissingTranslationStrategy.Warning; | ||
break; | ||
case 'ignore': | ||
missingTranslation = core_1.MissingTranslationStrategy.Ignore; | ||
break; | ||
default: | ||
throw new Error("Unknown option for missingTranslation (" + cliOptions.missingTranslation + "). Use either error, warning or ignore."); | ||
} | ||
} | ||
var aotCompiler = compiler.createAotCompiler(ngCompilerHost, { | ||
translations: transContent, | ||
i18nFormat: cliOptions.i18nFormat, | ||
locale: cliOptions.locale, | ||
locale: cliOptions.locale, missingTranslation: missingTranslation, | ||
enableLegacyTemplate: options.enableLegacyTemplate !== false, | ||
@@ -64,0 +79,0 @@ genFilePreamble: PREAMBLE, |
@@ -12,2 +12,3 @@ import { AngularCompilerOptions } from '@angular/tsc-wrapped'; | ||
locale?: string; | ||
missingTranslation?: string; | ||
readResource: (fileName: string) => Promise<string>; | ||
@@ -14,0 +15,0 @@ } |
@@ -57,2 +57,3 @@ /** | ||
locale: options.locale, | ||
missingTranslation: options.missingTranslation, | ||
basePath: options.basePath | ||
@@ -59,0 +60,0 @@ }; |
@@ -18,3 +18,3 @@ /** | ||
*/ | ||
exports.VERSION = new core_1.Version('4.1.1'); | ||
exports.VERSION = new core_1.Version('4.2.0-beta.0'); | ||
//# sourceMappingURL=version.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
142925
1359
1
+ Added@angular/compiler@4.2.0-beta.0(transitive)
+ Added@angular/core@4.2.0-beta.0(transitive)
+ Added@angular/tsc-wrapped@4.2.0-beta.0(transitive)
- Removed@angular/compiler@4.1.1(transitive)
- Removed@angular/core@4.1.1(transitive)
- Removed@angular/tsc-wrapped@4.1.1(transitive)