Skip to content

Commit 15ca801

Browse files
authored
update angular version: 18 (#58)
change `*ngIf`s by @if in lib component
1 parent 58e1283 commit 15ca801

22 files changed

+4923
-15076
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [1.8.0] - 2025-01-01
5+
### Change
6+
- Update to Angular 18
7+
- Remove `*ngIf` directives from lib component
8+
49
## [1.7.0] - 2025-06-16
510
### Change
611
- Update to Angular 17

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This is a toggle switch button component, you can see the demo [here][demo-url]
1414

1515
| Angular | ng-toggle-button|
1616
| -------- |:------:|
17+
| >=18.0.0 | v1.8.x |
1718
| >=17.0.0 | v1.7.x |
1819
| >=16.0.0 | v1.6.x |
1920
| >=15.0.0 | v1.5.x |

angular.json

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@
1212
"build": {
1313
"builder": "@angular-devkit/build-angular:ng-packagr",
1414
"options": {
15-
"tsConfig": "projects/ng-toggle/tsconfig.lib.json",
1615
"project": "projects/ng-toggle/ng-package.json"
17-
}
16+
},
17+
"configurations": {
18+
"production": {
19+
"tsConfig": "projects/ng-toggle/tsconfig.lib.prod.json"
20+
},
21+
"development": {
22+
"tsConfig": "projects/ng-toggle/tsconfig.lib.json"
23+
}
24+
},
25+
"defaultConfiguration": "production"
1826
},
1927
"test": {
2028
"builder": "@angular-devkit/build-angular:karma",
@@ -36,87 +44,78 @@
3644
"prefix": "app",
3745
"architect": {
3846
"build": {
39-
"builder": "@angular-devkit/build-angular:browser",
47+
"builder": "@angular-devkit/build-angular:application",
4048
"options": {
4149
"outputPath": "dist/demo",
4250
"index": "projects/demo/src/index.html",
43-
"main": "projects/demo/src/main.ts",
51+
"browser": "projects/demo/src/main.ts",
4452
"polyfills": [
4553
"zone.js"
4654
],
4755
"tsConfig": "projects/demo/tsconfig.app.json",
48-
"aot": false,
4956
"assets": [
50-
"projects/demo/src/favicon.ico",
51-
"projects/demo/src/assets"
57+
{
58+
"glob": "**/*",
59+
"input": "projects/demo/public"
60+
}
5261
],
5362
"styles": [
5463
"projects/demo/src/styles.css"
5564
],
56-
"scripts": [],
57-
"vendorChunk": true,
58-
"extractLicenses": false,
59-
"buildOptimizer": false,
60-
"sourceMap": true,
61-
"optimization": false,
62-
"namedChunks": true
65+
"scripts": []
6366
},
6467
"configurations": {
6568
"production": {
66-
"fileReplacements": [
67-
{
68-
"replace": "projects/demo/src/environments/environment.ts",
69-
"with": "projects/demo/src/environments/environment.prod.ts"
70-
}
71-
],
72-
"optimization": true,
73-
"outputHashing": "all",
74-
"sourceMap": false,
75-
"namedChunks": false,
76-
"aot": true,
77-
"extractLicenses": true,
78-
"vendorChunk": false,
79-
"buildOptimizer": true,
8069
"budgets": [
8170
{
8271
"type": "initial",
83-
"maximumWarning": "2mb",
84-
"maximumError": "5mb"
72+
"maximumWarning": "500kB",
73+
"maximumError": "1MB"
74+
},
75+
{
76+
"type": "anyComponentStyle",
77+
"maximumWarning": "2kB",
78+
"maximumError": "4kB"
8579
}
86-
]
80+
],
81+
"outputHashing": "all"
82+
},
83+
"development": {
84+
"optimization": false,
85+
"extractLicenses": false,
86+
"sourceMap": true
8787
}
8888
},
89-
"defaultConfiguration": ""
89+
"defaultConfiguration": "production"
9090
},
9191
"serve": {
9292
"builder": "@angular-devkit/build-angular:dev-server",
93-
"options": {
94-
"buildTarget": "demo:build"
95-
},
9693
"configurations": {
9794
"production": {
9895
"buildTarget": "demo:build:production"
96+
},
97+
"development": {
98+
"buildTarget": "demo:build:development"
9999
}
100-
}
100+
},
101+
"defaultConfiguration": "development"
101102
},
102103
"extract-i18n": {
103-
"builder": "@angular-devkit/build-angular:extract-i18n",
104-
"options": {
105-
"buildTarget": "demo:build"
106-
}
104+
"builder": "@angular-devkit/build-angular:extract-i18n"
107105
},
108106
"test": {
109107
"builder": "@angular-devkit/build-angular:karma",
110108
"options": {
111-
"main": "projects/demo/src/test.ts",
112109
"polyfills": [
113110
"zone.js",
114111
"zone.js/testing"
115112
],
116113
"tsConfig": "projects/demo/tsconfig.spec.json",
117114
"assets": [
118-
"projects/demo/src/favicon.ico",
119-
"projects/demo/src/assets"
115+
{
116+
"glob": "**/*",
117+
"input": "projects/demo/public"
118+
}
120119
],
121120
"styles": [
122121
"projects/demo/src/styles.css"
@@ -127,4 +126,4 @@
127126
}
128127
}
129128
}
130-
}
129+
}

0 commit comments

Comments
 (0)