Skip to content

build: upgrade angular@12 #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# dependencies
/node_modules
package-lock.json
yarn.lock

# profiling files
chrome-profiler-events*.json
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CoreUI is an Open Source UI Kit built on top of Bootstrap 4. CoreUI is the faste
Before you begin, make sure your development environment includes `Node.js®` and an `npm` package manager.

###### Node.js
Angular 11 requires `Node.js` version 10.13 or later.
Angular 12 requires `Node.js` version 12.20.0 or later.

- To check your version, run `node -v` in a terminal/console window.
- To get `Node.js`, go to [nodejs.org](https://nodejs.org/).
Expand All @@ -67,7 +67,7 @@ Install the Angular CLI globally using a terminal/console window.
npm install -g @angular/cli
```

##### Update to Angular 11
##### Update to Angular 12
see: [https://update.angular.io](https://update.angular.io)

## CoreUI Installation
Expand Down
12 changes: 10 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@
"node_modules/simple-line-icons/css/simple-line-icons.css",
"src/scss/style.scss"
],
"scripts": []
"scripts": [],
"aot": false,
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -51,7 +58,8 @@
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"ng": "ng",
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
"build-lib:dev": "ng build @coreui/angular --watch",
"build-lib:prod": "ng build @coreui/angular --prod",
"build-lib:prod": "ng build @coreui/angular --configuration production",
"test-lib:dev": "ng test @coreui/angular",
"test-lib:prod": "ng test @coreui/angular --karmaConfig=projects/coreui/angular/karma.conf.github.js",
"prestart": "npm run postinstall",
Expand All @@ -33,46 +33,46 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^11.2.2",
"@angular/common": "^11.2.2",
"@angular/compiler": "^11.2.2",
"@angular/core": "^11.2.2",
"@angular/forms": "^11.2.2",
"@angular/localize": "^11.2.2",
"@angular/platform-browser": "^11.2.2",
"@angular/platform-browser-dynamic": "^11.2.2",
"@angular/router": "^11.2.2",
"@angular/animations": "^12.2.3",
"@angular/common": "^12.2.3",
"@angular/compiler": "^12.2.3",
"@angular/core": "^12.2.3",
"@angular/forms": "^12.2.3",
"@angular/localize": "^12.2.3",
"@angular/platform-browser": "^12.2.3",
"@angular/platform-browser-dynamic": "^12.2.3",
"@angular/router": "^12.2.3",
"rxjs": "^6.6.3",
"tslib": "^2.1.0",
"zone.js": "^0.11.4"
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1102.1",
"@angular/cli": "^11.2.1",
"@angular/compiler-cli": "^11.2.2",
"@angular/language-service": "^11.2.2",
"@angular-devkit/build-angular": "^12.2.3",
"@angular/cli": "^12.2.3",
"@angular/compiler-cli": "^12.2.3",
"@angular/language-service": "^12.2.3",
"@coreui/coreui": "^2.1.16",
"@types/jasmine": "^3.6.4",
"@types/node": "^14.14.31",
"codelyzer": "^6.0.1",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.2",
"karma": "^5.2.3",
"karma": "^6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"ng-packagr": "^11.2.4",
"ng-packagr": "^12.2.1",
"ngx-perfect-scrollbar": "^10.1.0",
"protractor": "~7.0.0",
"shelljs": "^0.8.4",
"simple-line-icons": "^2.5.5",
"ts-node": "^9.1.1",
"tslint": "~6.1.3",
"typescript": "~4.0.5"
"typescript": "~4.3.5"
},
"engines": {
"node": ">= 10.13",
"npm": ">= 6"
}
}
}
4 changes: 2 additions & 2 deletions projects/coreui/angular/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export const environment = {
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import 'core-js/es/reflect';
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.


/***************************************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion src/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand Down