Skip to content

Commit

Permalink
Merge pull request #53 from Bramikke/feature/angular16-compatibility-…
Browse files Browse the repository at this point in the history
…update

Feature/angular16 compatibility update
  • Loading branch information
jeanettephung authored Sep 6, 2023
2 parents 20f3205 + 8d2909e commit c36b7be
Show file tree
Hide file tree
Showing 49 changed files with 6,030 additions and 4,407 deletions.
42 changes: 42 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
}
},
{
"files": ["*.html"],
"extends": [
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
],
"rules": {}
}
]
}
11 changes: 6 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: deploy

on:
on:
push:
pull_request:
branches:
Expand All @@ -21,18 +21,19 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# npm ci REQUIRES a package-lock.json
# npm ci REQUIRES a package-lock.json
- name: Install Dependencies
run: npm ci
- name: Build library
run: npm run build
- name: Build js and modules
run: npm run build:app
- name: Deploy page
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/zingchart-angular-app
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
destination_dir: ./
keep_files: false

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/dist
/tmp
/out-tsc
/.angular
# Only exists if Bazel was run
/bazel-out

Expand Down Expand Up @@ -44,5 +45,3 @@ testem.log
# System Files
.DS_Store
Thumbs.db

.angular/cache/
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

72 changes: 37 additions & 35 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"zingchart-angular": {
"zing-app": {
"projectType": "application",
"schematics": {},
"root": "",
Expand All @@ -16,17 +16,10 @@
"outputPath": "dist/zingchart-angular-app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": [
"zone.js"
],
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -58,70 +51,79 @@
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "zing-app:build"
},
"configurations": {
"production": {
"browserTarget": "zingchart-angular:build:production"
"browserTarget": "zing-app:build:production"
},
"development": {
"browserTarget": "zingchart-angular:build:development"
"browserTarget": "zing-app:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "zingchart-angular:build"
"browserTarget": "zing-app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
},
"zingchart-angular-component": {
"zingchart-angular": {
"projectType": "library",
"root": "projects/zingchart-angular-component",
"sourceRoot": "projects/zingchart-angular-component/src",
"root": "projects/zingchart-angular",
"sourceRoot": "projects/zingchart-angular/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/zingchart-angular-component/ng-package.json"
"project": "projects/zingchart-angular/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/zingchart-angular-component/tsconfig.lib.prod.json"
"tsConfig": "projects/zingchart-angular/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/zingchart-angular-component/tsconfig.lib.json"
"tsConfig": "projects/zingchart-angular/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "projects/zingchart-angular-component/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
"tsConfig": "projects/zingchart-angular/tsconfig.spec.json",
"karmaConfig": "projects/zingchart-angular/karma.conf.js",
"polyfills": ["zone.js", "zone.js/testing"]
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/zingchart-angular/**/*.ts",
"projects/zingchart-angular/**/*.html"
]
}
}
Expand Down
17 changes: 17 additions & 0 deletions browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.

# For additional information regarding the format and rule options, please see:

# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:

# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
37 changes: 37 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: "",
frameworks: ["jasmine", "@angular-devkit/build-angular"],
plugins: [
require("karma-jasmine"),
require("karma-chrome-launcher"),
require("karma-jasmine-html-reporter"),
require("karma-coverage"),
require("@angular-devkit/build-angular/plugins/karma"),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageReporter: {
dir: require("path").join(__dirname, "./coverage/zing-app"),
subdir: ".",
reporters: [
{ type: "html" },
{ type: "lcovonly" },
{ type: "text-summary" },
],
fixWebpackSourcePaths: true,
},
reporters: ["progress", "kjhtml"],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ["Chrome"],
singleRun: false,
restartOnFileChange: true,
});
};
Loading

0 comments on commit c36b7be

Please sign in to comment.