Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Build web app
run: npx nx run-many --target test
run: pnpm -w -r run test

lint:
runs-on: ubuntu-latest
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Build web app
run: npx oxlint
run: pnpm exec oxlint

build:
runs-on: ubuntu-latest
Expand All @@ -73,4 +73,4 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Build web app
run: npx nx build web
run: pnpm --filter web run build
2 changes: 1 addition & 1 deletion .github/workflows/push_on_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}

- name: Build Frontend
run: npx nx build web
run: pnpm --filter web run build

- name: Build Frontend Image
id: build-frontend-image
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
test:
uv run pytest tests --doctest-modules --cov=abrechnung

.PHONY: dev-web
dev-web:
pnpm --filter web run dev

.PHONY: format
format:
uv run ruff format
Expand Down Expand Up @@ -46,4 +50,4 @@ serve-docs:
generate-openapi:
mkdir -p api
uv run abrechnung -c config.yaml show-openapi > api/openapi.json
npx nx run-many --target generate-openapi
pnpm -w -r run generate-openapi
68 changes: 0 additions & 68 deletions apps/web-e2e/playwright.config.ts

This file was deleted.

9 changes: 0 additions & 9 deletions apps/web-e2e/project.json

This file was deleted.

8 changes: 0 additions & 8 deletions apps/web-e2e/src/example.spec.ts

This file was deleted.

10 changes: 0 additions & 10 deletions apps/web-e2e/tsconfig.json

This file was deleted.

12 changes: 12 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "web",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview --port 4200",
"generate-openapi": "pnpm exec @rtk-query/codegen-openapi openapi-config.ts",
"prebuild": "cp -rf ../../assets/* public/assets/ && cp ../../assets/logo.png public/favicon.png"
}
}
26 changes: 0 additions & 26 deletions apps/web/project.json

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node", "@nx/react/typings/cssmodule.d.ts", "@nx/react/typings/image.d.ts", "vite/client"]
"types": ["node", "vite/client"]
},
"exclude": [
"src/**/*.spec.ts",
Expand Down
10 changes: 1 addition & 9 deletions apps/web/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": [
"vitest/globals",
"vitest/importMeta",
"vite/client",
"node",
"vitest",
"@nx/react/typings/cssmodule.d.ts",
"@nx/react/typings/image.d.ts"
]
"types": ["vitest/globals", "vitest/importMeta", "vite/client", "node", "vitest"]
},
"include": [
"vite.config.ts",
Expand Down
14 changes: 2 additions & 12 deletions apps/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import checker from "vite-plugin-checker";
import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
import { nxCopyAssetsPlugin } from "@nx/vite/plugins/nx-copy-assets.plugin";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig(() => ({
root: __dirname,
Expand All @@ -21,16 +20,7 @@ export default defineConfig(() => ({
port: 4200,
host: "0.0.0.0",
},
plugins: [
react(),
nxViteTsPaths(),
nxCopyAssetsPlugin(["*.md"]),
checker({ typescript: { tsconfigPath: "tsconfig.app.json" } }),
],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
// },
plugins: [react(), tsconfigPaths(), checker({ typescript: { tsconfigPath: "tsconfig.app.json" } })],
build: {
outDir: "../../dist/apps/web",
emptyOutDir: true,
Expand Down
2 changes: 1 addition & 1 deletion debian/build_virtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ interest dh-virtualenv-interpreter-update
EOF

export DESTDIR="debian/abrechnung"
NODE_OPTIONS="--max_old_space_size=4096" CI=true && pnpm install --force --frozen-lockfile && npx nx build web
NODE_OPTIONS="--max_old_space_size=4096" CI=true && pnpm install --force --frozen-lockfile && pnpm --filter web run build
mkdir -p $DESTDIR/usr/share/
mv dist/apps/web $DESTDIR/usr/share/abrechnung_web

Expand Down
2 changes: 1 addition & 1 deletion docs/development/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Working on the frontend is quite easy, simply run

```shell
pnpm install
npx nx serve web
make dev-web
```

and you are good to go!
Expand Down
8 changes: 8 additions & 0 deletions libs/api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@abrechnung/api",
"version": "0.0.0",
"private": true,
"scripts": {
"generate-openapi": "sh -lc \"pnpm exec typed-openapi --schemas-only --runtime zod ../../api/openapi.json --output src/lib/generated/schema.ts && pnpm exec openapi-typescript-codegen --input ../../api/openapi.json --output src/lib/generated --useUnionTypes --name Client --useOptions && sed -i 's/z.record(/z.record(z.string(), /' src/lib/generated/schema.ts && sed -i 's/type: string/type: \"personal\"/' src/lib/generated/models/PersonalAccount.ts && sed -i 's/type: string/type: \"clearing\"/' src/lib/generated/models/ClearingAccount.ts && grep -rlZ eslint-disable src/lib/generated | xargs -0 sed -i 's/eslint-disable/oxlint-disable/' && echo \"/* oxlint-disable */\\n$(cat src/lib/generated/schema.ts)\" > src/lib/generated/schema.ts && echo \"/* tslint:disable */\\n$(cat src/lib/generated/schema.ts)\" > src/lib/generated/schema.ts && echo \"/* istanbul ignore file */\\n$(cat src/lib/generated/schema.ts)\" > src/lib/generated/schema.ts && pnpm exec oxfmt src/lib/generated\""
}
}
28 changes: 0 additions & 28 deletions libs/api/project.json

This file was deleted.

26 changes: 0 additions & 26 deletions libs/api/vite.config.ts

This file was deleted.

10 changes: 1 addition & 9 deletions libs/components/.babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"presets": [
[
"@nx/react/babel",
{
"runtime": "automatic",
"useBuiltIns": "usage"
}
]
],
"presets": [[]],
"plugins": []
}
7 changes: 7 additions & 0 deletions libs/components/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@abrechnung/components",
"version": "0.0.0",
"private": true,
"main": "src/index.ts",
"scripts": {}
}
8 changes: 0 additions & 8 deletions libs/components/project.json

This file was deleted.

2 changes: 1 addition & 1 deletion libs/components/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node", "@nx/react/typings/cssmodule.d.ts", "@nx/react/typings/image.d.ts"]
"types": ["node"]
},
"exclude": ["vite.config.ts", "src/**/*.spec.ts", "src/**/*.spec.tsx"],
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
Expand Down
26 changes: 0 additions & 26 deletions libs/components/vite.config.ts

This file was deleted.

Loading