Skip to content

Commit 2781c7d

Browse files
authored
Major/update to ng 14 (#28)
* update core + cli * update material * finished update to ng14
1 parent 20f45b9 commit 2781c7d

File tree

17 files changed

+162
-277
lines changed

17 files changed

+162
-277
lines changed

.github/workflows/pull-request.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,3 @@ jobs:
2727
run: yarn
2828
- name: build applikation
2929
run: yarn run build
30-
31-
- name: npm publish to GitHub
32-
working-directory: dist/ng-mat-components
33-
run: yarn publish --access public --new-version ${{ needs.generate_infos.outputs.version }} --no-git-tag-version
34-
env:
35-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

angular.json

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@
5858
"polyfills": "projects/lib-workspace/src/polyfills.ts",
5959
"tsConfig": "projects/lib-workspace/tsconfig.app.json",
6060
"inlineStyleLanguage": "scss",
61-
"allowedCommonJsDependencies": ["moment"],
62-
"assets": ["projects/lib-workspace/src/favicon.ico", "projects/lib-workspace/src/assets"],
63-
"styles": ["./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "projects/lib-workspace/src/styles.scss"],
61+
"assets": [
62+
"projects/lib-workspace/src/favicon.ico",
63+
"projects/lib-workspace/src/assets"
64+
],
65+
"styles": [
66+
"projects/lib-workspace/src/styles.scss"
67+
],
6468
"scripts": []
6569
},
6670
"configurations": {
@@ -122,12 +126,21 @@
122126
"tsConfig": "projects/lib-workspace/tsconfig.spec.json",
123127
"karmaConfig": "projects/lib-workspace/karma.conf.js",
124128
"inlineStyleLanguage": "scss",
125-
"assets": ["projects/lib-workspace/src/favicon.ico", "projects/lib-workspace/src/assets"],
126-
"styles": ["./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "projects/lib-workspace/src/styles.scss"],
129+
"assets": [
130+
"projects/lib-workspace/src/favicon.ico",
131+
"projects/lib-workspace/src/assets"
132+
],
133+
"styles": [
134+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
135+
"projects/lib-workspace/src/styles.scss"
136+
],
127137
"scripts": []
128138
}
129139
}
130140
}
131141
}
142+
},
143+
"cli": {
144+
"analytics": false
132145
}
133-
}
146+
}

package.json

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
"ng": "ng",
1111
"start": "ng serve",
1212
"start:codespace": "ng serve --disable-host-check",
13-
"watch:scss": "sass --watch projects/ng-mat-components/test.scss:dist/css/css",
1413
"prebuild": "cp README.md projects/ng-mat-components/",
1514
"build": "ng build --project ng-mat-components",
16-
"build:sass": "sass projects/ng-mat-components/_index.scss:dist/css/css",
1715
"build:workspace": "ng build --project lib-workspace",
1816
"watch": "ng build --watch --configuration development",
1917
"test": "ng test",
@@ -22,16 +20,16 @@
2220
},
2321
"private": false,
2422
"dependencies": {
25-
"@angular/animations": "~13.3.11",
26-
"@angular/cdk": "13.3.9",
27-
"@angular/common": "~13.3.11",
28-
"@angular/compiler": "~13.3.11",
29-
"@angular/core": "~13.3.11",
30-
"@angular/forms": "~13.3.11",
31-
"@angular/material": "13.3.9",
32-
"@angular/platform-browser": "~13.3.11",
33-
"@angular/platform-browser-dynamic": "~13.3.11",
34-
"@angular/router": "~13.3.11",
23+
"@angular/animations": "^14.2.12",
24+
"@angular/cdk": "14.2.7",
25+
"@angular/common": "^14.2.12",
26+
"@angular/compiler": "^14.2.12",
27+
"@angular/core": "^14.2.12",
28+
"@angular/forms": "^14.2.12",
29+
"@angular/material": "14.2.7",
30+
"@angular/platform-browser": "^14.2.12",
31+
"@angular/platform-browser-dynamic": "^14.2.12",
32+
"@angular/router": "^14.2.12",
3533
"date-fns": "^2.29.3",
3634
"material-icons": "^1.13.1",
3735
"postcss": "^8.4.20",
@@ -41,30 +39,30 @@
4139
"zone.js": "~0.11.7"
4240
},
4341
"devDependencies": {
44-
"@angular-devkit/build-angular": "~13.3.9",
45-
"@angular-eslint/builder": "13.5.0",
46-
"@angular-eslint/eslint-plugin": "13.5.0",
47-
"@angular-eslint/eslint-plugin-template": "13.5.0",
48-
"@angular-eslint/schematics": "13.5.0",
49-
"@angular-eslint/template-parser": "13.5.0",
50-
"@angular/cli": "~13.3.9",
51-
"@angular/compiler-cli": "~13.3.11",
42+
"@angular-devkit/build-angular": "^14.2.10",
43+
"@angular-eslint/builder": "14.4.0",
44+
"@angular-eslint/eslint-plugin": "14.4.0",
45+
"@angular-eslint/eslint-plugin-template": "14.4.0",
46+
"@angular-eslint/schematics": "14.4.0",
47+
"@angular-eslint/template-parser": "14.4.0",
48+
"@angular/cli": "^14.2.10",
49+
"@angular/compiler-cli": "^14.2.12",
5250
"@types/jasmine": "~3.10.0",
5351
"@types/node": "^12.11.1",
54-
"@typescript-eslint/eslint-plugin": "5.27.1",
55-
"@typescript-eslint/parser": "5.27.1",
52+
"@typescript-eslint/eslint-plugin": "^5.36.2",
53+
"@typescript-eslint/parser": "^5.36.2",
5654
"autoprefixer": "^10.4.13",
57-
"eslint": "^8.17.0",
55+
"eslint": "^8.23.0",
5856
"jasmine-core": "~4.0.0",
5957
"karma": "~6.3.0",
6058
"karma-chrome-launcher": "~3.1.0",
6159
"karma-coverage": "~2.1.0",
6260
"karma-jasmine": "~4.0.0",
6361
"karma-jasmine-html-reporter": "~1.7.0",
64-
"ng-packagr": "^13.0.0",
62+
"ng-packagr": "^14.2.2",
6563
"prettier": "^2.8.3",
6664
"prettier-eslint": "^15.0.1",
6765
"sass": "^1.57.1",
68-
"typescript": "~4.5.2"
66+
"typescript": "~4.8.4"
6967
}
7068
}

projects/lib-workspace/src/styles.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@
33
@use './styling/palettes';
44

55
@import 'material-icons/iconfont/material-icons.scss';
6-
@import './styling/roboto.scss';
76

87
@include mat.core();
8+
99
@include fsc.normalize();
1010
@include fsc.core();
11-
11+
@include fsc.roboto();
1212

1313
$my-typography: mat.define-typography-config($font-family: 'Roboto-local');
1414

15-
mat.$theme-ignore-duplication-warnings: true;
16-
1715
// Define a dark theme
1816
$dark-theme: mat.define-dark-theme((color: (primary: mat.define-palette(palettes.$md-primary),
1917
accent: mat.define-palette(palettes.$md-accent),
@@ -37,7 +35,7 @@ $light-theme: mat.define-light-theme((color: (primary: mat.define-palette(palett
3735
@media (prefers-color-scheme: light) {
3836
// Use the `-color` mixins to only apply color styles without reapplying the same
3937
// typography and density styles.
40-
@include mat.all-component-themes($light-theme);
38+
@include mat.all-component-colors($light-theme);
4139
@include fsc.all-component-themes($light-theme);
4240
}
4341

projects/lib-workspace/src/styling/roboto.scss

Lines changed: 0 additions & 95 deletions
This file was deleted.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@use 'sass:color';
22
@use 'sass:map';
33

4-
@forward 'theme' show all-component-themes,
4+
@forward 'theming' show all-component-themes,
55
core,
6-
normalize;
6+
normalize;
7+
@forward './styles/fonts/roboto' show roboto;
File renamed without changes.

projects/ng-mat-components/assets/fonts/roboto.scss

Lines changed: 0 additions & 95 deletions
This file was deleted.

projects/ng-mat-components/ng-package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
"lib": {
55
"entryFile": "src/public-api.ts"
66
},
7+
"inlineStyleLanguage": "scss",
78
"assets": [
89
"_index.scss",
9-
"_theme.scss",
10-
"./assets/fonts/roboto.scss"
10+
"_theming.scss",
11+
"./styles/fonts/_roboto.scss"
1112
]
1213
}

projects/ng-mat-components/package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"version": "0.0.0-PLACEHOLDER",
44
"license": "Apache-2.0",
55
"peerDependencies": {
6-
"@angular/common": "^13.0.0",
7-
"@angular/core": "^13.0.0",
8-
"@angular/material": "^13.0.0",
6+
"@angular/common": "^14.0.0",
7+
"@angular/core": "^14.0.0",
8+
"@angular/material": "^14.0.0",
99
"date-fns": "^2.29.3"
1010
},
1111
"dependencies": {
@@ -33,8 +33,14 @@
3333
".": {
3434
"sass": "./_index.scss"
3535
},
36+
"./theming": {
37+
"sass": "./_theming.scss"
38+
},
39+
"./_theming": {
40+
"sass": "./_theming.scss"
41+
},
3642
"./fonts/roboto": {
37-
"sass": "./assets/fonts/roboto.scss"
43+
"sass": "./styles/fonts/_roboto.scss"
3844
}
3945
}
4046
}

0 commit comments

Comments
 (0)