Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

feat: support for Angular 5.1 #374

Merged
merged 2 commits into from
Dec 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions demo/AngularApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
}
},
"dependencies": {
"@angular/common": "~5.0.0",
"@angular/compiler": "~5.0.0",
"@angular/core": "~5.0.0",
"@angular/forms": "~5.0.0",
"@angular/http": "~5.0.0",
"@angular/platform-browser": "~5.0.0",
"@angular/platform-browser-dynamic": "~5.0.0",
"@angular/router": "~5.0.0",
"@angular/common": "~5.1.0",
"@angular/compiler": "~5.1.0",
"@angular/core": "~5.1.0",
"@angular/forms": "~5.1.0",
"@angular/http": "~5.1.0",
"@angular/platform-browser": "~5.1.0",
"@angular/platform-browser-dynamic": "~5.1.0",
"@angular/router": "~5.1.0",
"nativescript-angular": "next",
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
Expand All @@ -29,8 +29,8 @@
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/compiler-cli": "~5.0.0",
"@ngtools/webpack": "^1.8.0",
"@angular/compiler-cli": "~5.1.0",
"@ngtools/webpack": "~1.9.0",
"@types/chai": "^4.0.2",
"@types/mocha": "^2.2.41",
"@types/node": "^7.0.5",
Expand All @@ -39,9 +39,9 @@
"babylon": "6.18.0",
"chai": "~4.1.1",
"chai-as-promised": "~7.1.1",
"copy-webpack-plugin": "~4.0.1",
"copy-webpack-plugin": "~4.3.0",
"css-loader": "~0.28.7",
"extract-text-webpack-plugin": "~3.0.0",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"mocha": "~3.5.0",
"mocha-junit-reporter": "^1.13.0",
Expand All @@ -53,12 +53,12 @@
"nativescript-worker-loader": "~0.8.1",
"node-sass": "^4.7.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.1.0",
"resolve-url-loader": "~2.2.1",
"sass-loader": "^6.0.6",
"typescript": "~2.4.2",
"webpack": "~3.8.1",
"webpack-bundle-analyzer": "^2.8.2",
"webpack-sources": "^1.0.2"
"webpack": "~3.10.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "^1.1.0"
},
"scripts": {
"ns-bundle": "ns-bundle",
Expand Down
21 changes: 13 additions & 8 deletions dependencyManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ function addDependency(deps, name, version, force) {

function getRequiredDeps(packageJson) {
const deps = {
"webpack": "~3.8.1",
"webpack-bundle-analyzer": "^2.8.2",
"webpack-sources": "~1.0.1",
"copy-webpack-plugin": "~4.0.1",
"webpack": "~3.10.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "~1.1.0",
"copy-webpack-plugin": "~4.3.0",
"raw-loader": "~0.5.1",
"css-loader": "~0.28.7",
"nativescript-worker-loader": "~0.8.1",
"resolve-url-loader": "~2.1.0",
"extract-text-webpack-plugin": "~3.0.0",
"resolve-url-loader": "~2.2.1",
"extract-text-webpack-plugin": "~3.0.2",
};

if (isAngular({packageJson})) {
Expand Down Expand Up @@ -100,11 +100,16 @@ function resolveAngularDeps(usedDependencies) {
"typescript": "~2.1.6",
"@ngtools/webpack": "1.2.13",
});
} else {
Object.assign(depsToAdd, {
} else if (angularCoreVersion.startsWith("5.0")) {
Object.assign(depsToAdd, {
"typescript": "~2.4.2",
"@ngtools/webpack": "~1.8.2",
});
} else {
Object.assign(depsToAdd, {
"typescript": "~2.4.2",
"@ngtools/webpack": "~1.9.1",
});
}

return depsToAdd;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"shelljs": "^0.6.0"
},
"devDependencies": {
"@ngtools/webpack": "^1.8.0",
"@ngtools/webpack": "~1.9.0",
"@types/node": "^8.0.0",
"source-map-support": "^0.5.0",
"typescript": "^2.6.1"
Expand Down