Skip to content

Commit

Permalink
Merge branch 'dev' into CSCEXAM-721
Browse files Browse the repository at this point in the history
  • Loading branch information
lupari authored Feb 8, 2024
2 parents 996b9c6 + 250f7ca commit a72360f
Show file tree
Hide file tree
Showing 112 changed files with 4,024 additions and 6,181 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ jobs:

- name: Build UI
run: |
cd ui
rm -rf node_modules
npm i
npm run check-format
npm run check-lint
npm run build
cd ..
- name: Build backend and run tests
run: |
sed -i 's/\/var\/log\/exam/logs/g' $GITHUB_WORKSPACE/conf/logback.xml
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ EXAM Quickstart for developers

3. Get frontend dependencies and start frontend application in development mode

$ cd ui
$ npm install
$ npm start

Expand All @@ -28,7 +27,7 @@ EXAM Quickstart for developers
$ sbt -Dconfig.file=conf/dev.conf -jvm-debug 9999 -mem 2048
[exam] $ run

This opens up a debug port at 9999 and allocates 2 Gb of heap memory for the JVM
This opens up a debug port at 9999 and allocates 2 Gb of heap memory for the JVM.

5. Open http://localhost:4200 in your browser.
Accept the database migrations in case you see a prompt.
Expand Down
57 changes: 21 additions & 36 deletions ui/angular.json → angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,20 @@
}
},
"root": "",
"sourceRoot": "src",
"sourceRoot": "ui/src",
"prefix": "xm",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/exam",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"index": "ui/src/index.html",
"main": "ui/src/main.ts",
"polyfills": "ui/src/polyfills.ts",
"tsConfig": "ui/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"assets": ["ui/src/favicon.ico", "ui/src/assets"],
"styles": ["ui/src/styles.scss"],
"scripts": []
},
"configurations": {
Expand All @@ -46,17 +41,17 @@
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumError": "5kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
"replace": "ui/src/environments/environment.ts",
"with": "ui/src/environments/environment.prod.ts"
},
{
"replace": "src/app/interceptors/auth-interceptor.ts",
"with": "src/app/interceptors/auth-interceptor.prod.ts"
"replace": "ui/src/app/interceptors/auth-interceptor.ts",
"with": "ui/src/app/interceptors/auth-interceptor.prod.ts"
}
],
"outputHashing": "all",
Expand All @@ -76,7 +71,7 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"proxyConfig": "src/proxy.conf.js",
"proxyConfig": "ui/src/proxy.conf.js",
"buildTarget": "exam:build"
},
"configurations": {
Expand All @@ -98,37 +93,27 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"main": "ui/src/test.ts",
"polyfills": "ui/src/polyfills.ts",
"tsConfig": "ui/tsconfig.spec.json",
"karmaConfig": "ui/karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"assets": ["ui/src/favicon.ico", "ui/src/assets"],
"styles": ["ui/src/styles.scss"],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
"lintFilePatterns": ["ui/src/**/*.ts", "ui/src/**/*.html"]
}
}
}
}
},
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
],
"schematicCollections": ["@angular-eslint/schematics"],
"analytics": false
},
"schematics": {
Expand Down
14 changes: 14 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pre-commit:
commands:
prettier:
tags: frontend style
glob: "**/*.{ts,html}"
run: npx prettier --write {staged_files}
prettier-java:
tags: backend style
glob: "**/*.java"
run: prettier --write --plugin=prettier-plugin-java --print-width=120 --tab-width=4 {staged_files}
eslint:
tags: frontend rules
glob: "**/*.ts"
run: npx eslint --fix {staged_files}
Loading

0 comments on commit a72360f

Please sign in to comment.