Skip to content

Commit c36b7be

Browse files
Merge pull request #53 from Bramikke/feature/angular16-compatibility-update
Feature/angular16 compatibility update
2 parents 20f3205 + 8d2909e commit c36b7be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6030
-4407
lines changed

.eslintrc.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:@angular-eslint/recommended",
11+
"plugin:@angular-eslint/template/process-inline-templates"
12+
],
13+
"rules": {
14+
"@typescript-eslint/no-explicit-any": "off",
15+
"@angular-eslint/directive-selector": [
16+
"error",
17+
{
18+
"type": "attribute",
19+
"prefix": "app",
20+
"style": "camelCase"
21+
}
22+
],
23+
"@angular-eslint/component-selector": [
24+
"error",
25+
{
26+
"type": "element",
27+
"prefix": "app",
28+
"style": "kebab-case"
29+
}
30+
]
31+
}
32+
},
33+
{
34+
"files": ["*.html"],
35+
"extends": [
36+
"plugin:@angular-eslint/template/recommended",
37+
"plugin:@angular-eslint/template/accessibility"
38+
],
39+
"rules": {}
40+
}
41+
]
42+
}

.github/workflows/deploy.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: deploy
22

3-
on:
3+
on:
44
push:
55
pull_request:
66
branches:
@@ -21,18 +21,19 @@ jobs:
2121
uses: actions/setup-node@v3
2222
with:
2323
node-version: ${{ matrix.node-version }}
24-
# npm ci REQUIRES a package-lock.json
24+
# npm ci REQUIRES a package-lock.json
2525
- name: Install Dependencies
2626
run: npm ci
27+
- name: Build library
28+
run: npm run build
2729
- name: Build js and modules
2830
run: npm run build:app
2931
- name: Deploy page
3032
uses: peaceiris/actions-gh-pages@v3
3133
with:
3234
github_token: ${{ secrets.GITHUB_TOKEN }}
3335
publish_dir: ./dist/zingchart-angular-app
34-
user_name: 'github-actions[bot]'
35-
user_email: 'github-actions[bot]@users.noreply.github.com'
36+
user_name: "github-actions[bot]"
37+
user_email: "github-actions[bot]@users.noreply.github.com"
3638
destination_dir: ./
3739
keep_files: false
38-

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/dist
55
/tmp
66
/out-tsc
7+
/.angular
78
# Only exists if Bazel was run
89
/bazel-out
910

@@ -44,5 +45,3 @@ testem.log
4445
# System Files
4546
.DS_Store
4647
Thumbs.db
47-
48-
.angular/cache/

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

angular.json

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"zingchart-angular": {
6+
"zing-app": {
77
"projectType": "application",
88
"schematics": {},
99
"root": "",
@@ -16,17 +16,10 @@
1616
"outputPath": "dist/zingchart-angular-app",
1717
"index": "src/index.html",
1818
"main": "src/main.ts",
19-
"polyfills": [
20-
"zone.js"
21-
],
19+
"polyfills": ["zone.js"],
2220
"tsConfig": "tsconfig.app.json",
23-
"assets": [
24-
"src/favicon.ico",
25-
"src/assets"
26-
],
27-
"styles": [
28-
"src/styles.css"
29-
],
21+
"assets": ["src/favicon.ico", "src/assets"],
22+
"styles": ["src/styles.css"],
3023
"scripts": []
3124
},
3225
"configurations": {
@@ -58,70 +51,79 @@
5851
},
5952
"serve": {
6053
"builder": "@angular-devkit/build-angular:dev-server",
54+
"options": {
55+
"browserTarget": "zing-app:build"
56+
},
6157
"configurations": {
6258
"production": {
63-
"browserTarget": "zingchart-angular:build:production"
59+
"browserTarget": "zing-app:build:production"
6460
},
6561
"development": {
66-
"browserTarget": "zingchart-angular:build:development"
62+
"browserTarget": "zing-app:build:development"
6763
}
6864
},
6965
"defaultConfiguration": "development"
7066
},
7167
"extract-i18n": {
7268
"builder": "@angular-devkit/build-angular:extract-i18n",
7369
"options": {
74-
"browserTarget": "zingchart-angular:build"
70+
"browserTarget": "zing-app:build"
7571
}
7672
},
7773
"test": {
7874
"builder": "@angular-devkit/build-angular:karma",
7975
"options": {
80-
"polyfills": [
81-
"zone.js",
82-
"zone.js/testing"
83-
],
76+
"polyfills": ["zone.js", "zone.js/testing"],
8477
"tsConfig": "tsconfig.spec.json",
85-
"assets": [
86-
"src/favicon.ico",
87-
"src/assets"
88-
],
89-
"styles": [
90-
"src/styles.css"
91-
],
78+
"karmaConfig": "karma.conf.js",
79+
"assets": ["src/favicon.ico", "src/assets"],
80+
"styles": ["src/styles.css"],
9281
"scripts": []
9382
}
83+
},
84+
"lint": {
85+
"builder": "@angular-eslint/builder:lint",
86+
"options": {
87+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
88+
}
9489
}
9590
}
9691
},
97-
"zingchart-angular-component": {
92+
"zingchart-angular": {
9893
"projectType": "library",
99-
"root": "projects/zingchart-angular-component",
100-
"sourceRoot": "projects/zingchart-angular-component/src",
94+
"root": "projects/zingchart-angular",
95+
"sourceRoot": "projects/zingchart-angular/src",
10196
"prefix": "lib",
10297
"architect": {
10398
"build": {
10499
"builder": "@angular-devkit/build-angular:ng-packagr",
105100
"options": {
106-
"project": "projects/zingchart-angular-component/ng-package.json"
101+
"project": "projects/zingchart-angular/ng-package.json"
107102
},
108103
"configurations": {
109104
"production": {
110-
"tsConfig": "projects/zingchart-angular-component/tsconfig.lib.prod.json"
105+
"tsConfig": "projects/zingchart-angular/tsconfig.lib.prod.json"
111106
},
112107
"development": {
113-
"tsConfig": "projects/zingchart-angular-component/tsconfig.lib.json"
108+
"tsConfig": "projects/zingchart-angular/tsconfig.lib.json"
114109
}
115110
},
116111
"defaultConfiguration": "production"
117112
},
118113
"test": {
119114
"builder": "@angular-devkit/build-angular:karma",
120115
"options": {
121-
"tsConfig": "projects/zingchart-angular-component/tsconfig.spec.json",
122-
"polyfills": [
123-
"zone.js",
124-
"zone.js/testing"
116+
"tsConfig": "projects/zingchart-angular/tsconfig.spec.json",
117+
"karmaConfig": "projects/zingchart-angular/karma.conf.js",
118+
"polyfills": ["zone.js", "zone.js/testing"]
119+
}
120+
},
121+
"lint": {
122+
"builder": "@angular-eslint/builder:lint",
123+
"options": {
124+
"lintFilePatterns": [
125+
"projects/zingchart-angular/**/*.ts",
126+
"projects/zingchart-angular/**/*.html"
125127
]
126128
}
127129
}

browserslist

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
3+
# For additional information regarding the format and rule options, please see:
4+
5+
# https://github.com/browserslist/browserslist#queries
6+
7+
# You can see what browsers were selected by your queries by running:
8+
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
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

karma.conf.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: "",
7+
frameworks: ["jasmine", "@angular-devkit/build-angular"],
8+
plugins: [
9+
require("karma-jasmine"),
10+
require("karma-chrome-launcher"),
11+
require("karma-jasmine-html-reporter"),
12+
require("karma-coverage"),
13+
require("@angular-devkit/build-angular/plugins/karma"),
14+
],
15+
client: {
16+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
17+
},
18+
coverageReporter: {
19+
dir: require("path").join(__dirname, "./coverage/zing-app"),
20+
subdir: ".",
21+
reporters: [
22+
{ type: "html" },
23+
{ type: "lcovonly" },
24+
{ type: "text-summary" },
25+
],
26+
fixWebpackSourcePaths: true,
27+
},
28+
reporters: ["progress", "kjhtml"],
29+
port: 9876,
30+
colors: true,
31+
logLevel: config.LOG_INFO,
32+
autoWatch: true,
33+
browsers: ["Chrome"],
34+
singleRun: false,
35+
restartOnFileChange: true,
36+
});
37+
};

0 commit comments

Comments
 (0)