Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

350 framework lifecycle #357

Merged
merged 26 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0069767
upgrade to latest Node LTS version (lts/gallium)
mburri Feb 8, 2022
bbaf11a
downgrade to node 14 as default
mburri Feb 8, 2022
983973b
upgrade to angular 12
mburri Feb 8, 2022
e6deb05
replace deprecated slash.div in scss files
mburri Feb 8, 2022
2d03f4d
upgrade @angular/cdk
mburri Feb 8, 2022
548430a
upgrade ng-bootstrap
mburri Feb 8, 2022
ad00801
upgrade ng-select
mburri Feb 8, 2022
485ab71
upgrade to angular 13
mburri Feb 8, 2022
2a43aa5
replace tslint with eslint
mburri Feb 8, 2022
ddf6567
delete tslint configuration
mburri Feb 8, 2022
4c70831
update docs on linting/ prettier
mburri Feb 8, 2022
675712d
fix eslint errors empty lifecycle methods
mburri Feb 8, 2022
3f03e10
fix eslint issue with negated async pipes
mburri Feb 8, 2022
4deb7f0
fix eslint error with logical comporisons using !==
mburri Feb 8, 2022
e3153eb
lint ts and html files on commit
mburri Feb 8, 2022
431e464
add empty lifecycle method to bootstrap the application
mburri Feb 8, 2022
2304251
fix failing tests
mburri Feb 8, 2022
0ed9056
upgrade to node lts/gallium
mburri Feb 9, 2022
4e3220f
remove configuration for project e2e
mburri Feb 9, 2022
40c268a
remove dependency to protractor
mburri Feb 9, 2022
fc87255
dry up lint-staged configuration
mburri Feb 9, 2022
9195982
remove unused dependency @angular/cdk
mburri Feb 9, 2022
6026f4e
upgrade @ngx/translate dependencies
mburri Feb 9, 2022
11cff0d
fix typo
mburri Feb 9, 2022
e549575
upgrade to rxjs 7.5 and fix compilation errors
mburri Feb 9, 2022
266b58a
upgrade all dependencies except bootstrap
mburri Feb 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "erz",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "erz",
"style": "camelCase",
"type": "attribute"
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
},
{
"files": ["*.html"],
"excludedFiles": ["*inline-template-*.component.html"],
"extends": ["plugin:prettier/recommended"],
"rules": {
"prettier/prettier": ["error", { "parser": "angular" }]
}
}
]
}
10 changes: 5 additions & 5 deletions .github/workflows/buildDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ jobs:

strategy:
matrix:
node-version: [10.x]
node-version: [lts/gallium]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Build 🏭
- name: Build 🏭
run: |
npm install
npm run build:prod
cp README.md dist && cp -r doc dist
(cd dist && zip --recurse-paths webapp-schulverwaltung.zip *)
mv dist/webapp-schulverwaltung dist/app
sed -e "s~https://eventotest.api~$API_URL~g" dist/app/settings.example.js > dist/app/settings.js

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/lintAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,21 @@ jobs:

strategy:
matrix:
node-version: [10.x, 14.x]
node-version: [lts/gallium, lts/fermium]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: lint
run: |
npm install
npm run lint
npm run lint:format


- name: test
run: npm run test:headless
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ speed-measure-plugin.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

lint-staged -r
npx --no-install lint-staged -r
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12
lts/gallium
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
18 changes: 11 additions & 7 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/webapp-schulverwaltung",
"index": "src/index.html",
"main": "src/main.ts",
Expand Down Expand Up @@ -49,7 +48,13 @@
"bundleName": "styles-notifications"
}
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -63,7 +68,6 @@
"outputHashing": "none",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -79,7 +83,8 @@
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down Expand Up @@ -111,10 +116,9 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion doc/prettier.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The module is integrated threefold:

- Format on save in the editor, see https://prettier.io/docs/en/editors.html
- Pre-commit hook in Git
- Linting step in the CI pipeline: The build fails when a (TypeScript) file is not properly formatted (`npm run lint:format`)
- Linting step in the CI pipeline: The build fails when a (TypeScript) file is not properly formatted (part of `npm run lint`)

## Update Prettier version

Expand Down
1 change: 1 addition & 0 deletions doc/setup-dev-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This project was generated with [Angular CLI](https://github.com/angular/angular

- Install Node.js (preferably using [NVM](https://github.com/creationix/nvm))
- Clone this repository
- Execute `nvm use` to choose the correct Node version
- Execute `npm install`
- You're good to go

Expand Down
Loading