Skip to content

Commit 3ce6a21

Browse files
committed
chore: update to Angular 13
1 parent e91eeae commit 3ce6a21

19 files changed

+92
-276
lines changed

.browserslistrc

-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ last 2 Edge major versions
1414
last 2 Safari major versions
1515
last 2 iOS major versions
1616
Firefox ESR
17-
IE 11 # Angular supports IE 11 only as an opt-in. To opt-out, add the 'not' prefix on this line.

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ indent_size = 2
99
insert_final_newline = true
1010
trim_trailing_whitespace = true
1111

12+
[*.ts]
13+
quote_type = single
14+
1215
[*.md]
1316
max_line_length = off
1417
trim_trailing_whitespace = false

.gitignore

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# compiled output
3+
# Compiled output
44
/dist
55
/tmp
66
/out-tsc
77
# Only exists if Bazel was run
88
/bazel-out
99

10-
# dependencies
10+
# Node
1111
/node_modules
12+
npm-debug.log
13+
yarn-error.log
1214
package-lock.json
1315
yarn.lock
1416

@@ -17,32 +19,31 @@ chrome-profiler-events*.json
1719
speed-measure-plugin*.json
1820

1921
# IDEs and editors
20-
/.idea
22+
.idea/
2123
.project
2224
.classpath
2325
.c9/
2426
*.launch
2527
.settings/
2628
*.sublime-workspace
2729

28-
# IDE - VSCode
30+
# Visual Studio Code
2931
.vscode/*
3032
!.vscode/settings.json
3133
!.vscode/tasks.json
3234
!.vscode/launch.json
3335
!.vscode/extensions.json
3436
.history/*
3537

36-
# misc
37-
/.sass-cache
38+
# Miscellaneous
39+
/.angular/cache
40+
.sass-cache/
3841
/connect.lock
3942
/coverage
4043
/libpeerconnection.log
41-
npm-debug.log
42-
yarn-error.log
4344
testem.log
4445
/typings
4546

46-
# System Files
47+
# System files
4748
.DS_Store
4849
Thumbs.db

angular.json

+22-46
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,28 @@
77
"newProjectRoot": "projects",
88
"projects": {
99
"coreui": {
10+
"projectType": "application",
11+
"schematics": {
12+
"@schematics/angular:component": {
13+
"style": "scss"
14+
},
15+
"@schematics/angular:application": {
16+
"strict": true
17+
}
18+
},
1019
"root": "",
1120
"sourceRoot": "src",
12-
"projectType": "application",
1321
"prefix": "app",
14-
"schematics": {},
1522
"architect": {
1623
"build": {
1724
"builder": "@angular-devkit/build-angular:browser",
1825
"options": {
19-
"outputPath": "dist/@coreui",
26+
"outputPath": "dist/coreui/demo",
2027
"index": "src/index.html",
2128
"main": "src/main.ts",
2229
"polyfills": "src/polyfills.ts",
2330
"tsConfig": "src/tsconfig.app.json",
31+
"inlineStyleLanguage": "scss",
2432
"assets": [
2533
"src/favicon.ico",
2634
"src/assets"
@@ -34,9 +42,15 @@
3442
"configurations": {
3543
"production": {
3644
"budgets": [
45+
{
46+
"type": "initial",
47+
"maximumWarning": "500kb",
48+
"maximumError": "1mb"
49+
},
3750
{
3851
"type": "anyComponentStyle",
39-
"maximumWarning": "6kb"
52+
"maximumWarning": "2kb",
53+
"maximumError": "6kb"
4054
}
4155
],
4256
"fileReplacements": [
@@ -93,18 +107,6 @@
93107
"src/assets"
94108
]
95109
}
96-
},
97-
"lint": {
98-
"builder": "@angular-devkit/build-angular:tslint",
99-
"options": {
100-
"tsConfig": [
101-
"src/tsconfig.app.json",
102-
"src/tsconfig.spec.json"
103-
],
104-
"exclude": [
105-
"**/node_modules/**"
106-
]
107-
}
108110
}
109111
}
110112
},
@@ -118,15 +120,6 @@
118120
"protractorConfig": "e2e/protractor.conf.js",
119121
"devServerTarget": "coreui:serve"
120122
}
121-
},
122-
"lint": {
123-
"builder": "@angular-devkit/build-angular:tslint",
124-
"options": {
125-
"tsConfig": "e2e/tsconfig.e2e.json",
126-
"exclude": [
127-
"**/node_modules/**"
128-
]
129-
}
130123
}
131124
}
132125
},
@@ -139,13 +132,14 @@
139132
"build": {
140133
"builder": "@angular-devkit/build-angular:ng-packagr",
141134
"options": {
142-
"tsConfig": "projects/coreui/angular/tsconfig.lib.json",
143135
"project": "projects/coreui/angular/ng-package.json"
144136
},
145137
"configurations": {
146138
"production": {
147-
"project": "projects/coreui/angular/ng-package.prod.json",
148139
"tsConfig": "projects/coreui/angular/tsconfig.lib.prod.json"
140+
},
141+
"development": {
142+
"tsConfig": "projects/coreui/angular/tsconfig.lib.json"
149143
}
150144
},
151145
"defaultConfiguration": "production"
@@ -157,27 +151,9 @@
157151
"tsConfig": "projects/coreui/angular/tsconfig.spec.json",
158152
"karmaConfig": "projects/coreui/angular/karma.conf.js"
159153
}
160-
},
161-
"lint": {
162-
"builder": "@angular-devkit/build-angular:tslint",
163-
"options": {
164-
"tsConfig": [
165-
"projects/coreui/angular/tsconfig.lib.json",
166-
"projects/coreui/angular/tsconfig.spec.json"
167-
],
168-
"exclude": [
169-
"**/node_modules/**"
170-
]
171-
}
172154
}
173155
}
174156
}
175157
},
176-
"defaultProject": "coreui",
177-
"schematics": {
178-
"@schematics/angular:component": {
179-
"style": "scss"
180-
}
181-
}
182-
158+
"defaultProject": "coreui"
183159
}

package.json

+22-24
Original file line numberDiff line numberDiff line change
@@ -31,47 +31,45 @@
3131
},
3232
"private": true,
3333
"dependencies": {
34-
"@angular/animations": "^12.2.16",
35-
"@angular/common": "^12.2.16",
36-
"@angular/compiler": "^12.2.16",
37-
"@angular/core": "^12.2.16",
38-
"@angular/forms": "^12.2.16",
39-
"@angular/localize": "^12.2.16",
40-
"@angular/platform-browser": "^12.2.16",
41-
"@angular/platform-browser-dynamic": "^12.2.16",
42-
"@angular/router": "^12.2.16",
43-
"rxjs": "^6.6.7",
34+
"@angular/animations": "^13.3.0",
35+
"@angular/common": "^13.3.0",
36+
"@angular/compiler": "^13.3.0",
37+
"@angular/core": "^13.3.0",
38+
"@angular/forms": "^13.3.0",
39+
"@angular/localize": "^13.3.0",
40+
"@angular/platform-browser": "^13.3.0",
41+
"@angular/platform-browser-dynamic": "^13.3.0",
42+
"@angular/router": "^13.3.0",
43+
"rxjs": "^7.5.5",
4444
"tslib": "^2.3.1",
4545
"zone.js": "~0.11.4"
4646
},
4747
"devDependencies": {
48-
"@angular-devkit/build-angular": "^12.2.16",
49-
"@angular/cli": "^12.2.16",
50-
"@angular/compiler-cli": "^12.2.16",
51-
"@angular/language-service": "^12.2.16",
48+
"@angular-devkit/build-angular": "^13.3.0",
49+
"@angular/cli": "^13.3.0",
50+
"@angular/compiler-cli": "^13.3.0",
51+
"@angular/language-service": "^13.3.0",
5252
"@coreui/coreui": "^2.1.16",
53-
"@types/jasmine": "^3.6.11",
53+
"@types/jasmine": "^3.10.4",
5454
"@types/jasminewd2": "^2.0.10",
55-
"@types/node": "^14.18.12",
56-
"codelyzer": "^6.0.2",
57-
"jasmine-core": "~3.10.1",
55+
"@types/node": "^16.11.26",
56+
"jasmine-core": "~4.0.1",
5857
"jasmine-spec-reporter": "~7.0.0",
5958
"karma": "^6.3.17",
6059
"karma-chrome-launcher": "~3.1.1",
61-
"karma-coverage": "~2.0.3",
60+
"karma-coverage": "~2.1.1",
6261
"karma-jasmine": "~4.0.1",
6362
"karma-jasmine-html-reporter": "^1.7.0",
64-
"ng-packagr": "^12.2.7",
63+
"ng-packagr": "^13.3.0",
6564
"ngx-perfect-scrollbar": "^10.1.1",
6665
"protractor": "~7.0.0",
6766
"shelljs": "^0.8.5",
6867
"simple-line-icons": "^2.5.5",
6968
"ts-node": "^9.1.1",
70-
"tslint": "~6.1.3",
71-
"typescript": "~4.3.5"
69+
"typescript": "~4.6.2"
7270
},
7371
"engines": {
74-
"node": "^12.20.0 || >=14.0.0",
75-
"npm": ">= 6"
72+
"node": "^14.15.0 || >=16.10.0",
73+
"npm": ">= 8"
7674
}
7775
}
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
33
"dest": "../../../dist/@coreui/angular",
4-
"deleteDestPath": true,
4+
"deleteDestPath": true,
55
"lib": {
66
"entryFile": "src/public-api.ts"
77
}
8-
}
8+
}

projects/coreui/angular/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
"tslib": "^2.3.0"
2121
},
2222
"peerDependencies": {
23-
"@angular/common": "^12.0.0",
24-
"@angular/core": "^12.0.0",
25-
"@angular/router": "^12.0.0"
23+
"@angular/common": "^13.0.0",
24+
"@angular/core": "^13.0.0",
25+
"@angular/router": "^13.0.0"
2626
},
2727
"repository": {
2828
"type": "git",

projects/coreui/angular/src/test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ declare const require: any;
1515
// First, initialize the Angular testing environment.
1616
getTestBed().initTestEnvironment(
1717
BrowserDynamicTestingModule,
18-
platformBrowserDynamicTesting()
18+
platformBrowserDynamicTesting(), {
19+
teardown: { destroyAfterEach: false }
20+
}
1921
);
2022
// Then we find all the tests.
2123
const context = require.context('./', true, /\.spec\.ts$/);

projects/coreui/angular/tsconfig.lib.json

-8
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,13 @@
33
"extends": "../../../tsconfig.json",
44
"compilerOptions": {
55
"outDir": "../../../out-tsc/lib",
6-
"target": "es2015",
76
"declaration": true,
87
"declarationMap": true,
98
"inlineSources": true,
109
"types": [],
11-
"lib": [
12-
"dom",
13-
"es2018"
14-
]
1510
},
1611
"angularCompilerOptions": {
1712
"flatModuleId": "@coreui/angular",
18-
"skipTemplateCodegen": true,
19-
"strictMetadataEmit": true,
20-
"enableResourceInlining": true
2113
},
2214
"exclude": [
2315
"src/test.ts",

projects/coreui/angular/tsconfig.spec.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"compilerOptions": {
44
"outDir": "../../../out-tsc/spec",
55
"types": [
6-
"jasmine",
7-
"node"
6+
"jasmine"
87
]
98
},
109
"files": [

projects/coreui/angular/tslint.json

-18
This file was deleted.

src/app/_nav.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { INavData } from '../../dist/@coreui/angular/lib/sidebar/public_api';
1+
import { INavData } from '../../projects/coreui/angular/src/public-api';
22

33
export const navItems: INavData[] = [
44
{

0 commit comments

Comments
 (0)