Skip to content

Commit 3f03224

Browse files
author
Elena Hristova
committed
chore: update @angular/compiler-cli dev dependency
1 parent 1ca60a0 commit 3f03224

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

nativescript-angular/bin/update-app-ng-deps

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
const path = require("path");
44
const fs = require("fs");
55

6-
const browserDynamicDependency = "@angular/platform-browser-dynamic";
76
const binPath = __dirname;
87
const pluginPath = path.dirname(binPath);
98
const pluginPackageJsonPath = path.join(pluginPath, "package.json");
@@ -28,17 +27,25 @@ function updateDeps(deps, devDeps, newDeps) {
2827
deps[dependencyName] = version;
2928
}
3029

31-
console.log(`Updated dependency ${dependencyName} to version: ${version}.`);
30+
logUpdatedDependency(dependencyName, version);
3231
});
3332

3433
const ngDep = Object.keys(newDeps).find(dep => dep.startsWith("@angular"));
3534
const version = newDeps[ngDep];
36-
if (deps["@angular/animations"]) {
37-
deps["@angular/animations"] = version;
35+
const animationsDependency = "@angular/animations";
36+
if (deps[animationsDependency]) {
37+
deps[animationsDependency] = version;
38+
logUpdatedDependency(animationsDependency, version);
3839
}
3940

40-
if (deps["@angular/compiler-cli"]) {
41-
deps["@angular/compiler-cli"] = version;
41+
const compilerCliDependency = "@angular/compiler-cli";
42+
if (devDeps[compilerCliDependency]) {
43+
devDeps[compilerCliDependency] = version;
44+
logUpdatedDependency(compilerCliDependency, version);
45+
}
46+
47+
function logUpdatedDependency(dependencyName, version) {
48+
console.log(`Updated dependency ${dependencyName} to version: ${version}.`);
4249
}
4350
}
4451

0 commit comments

Comments
 (0)