Refactor: rename app/ui-docs/ to app/docs/

This commit is contained in:
jon r 2025-04-24 16:35:03 +02:00
parent 93fd5f1937
commit 701db82e10
51 changed files with 21 additions and 12 deletions

8
.gitignore vendored
View File

@ -94,10 +94,10 @@ app/coverage/
app/selenium-debug.log
# Vitepress
app/ui-docs/.vitepress/.vite
app/ui-docs/.vitepress/cache
app/ui-docs/.vitepress/dist
app/ui-docs/public
app/docs/.vitepress/.vite
app/docs/.vitepress/cache
app/docs/.vitepress/dist
app/docs/public
# Docs
docs/_build

View File

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 183 KiB

View File

@ -25,7 +25,7 @@ docs](https://vitepress.dev/guide/using-vue#vs-code-intellisense-support):
:::
1. Create a file `Xyz.vue` at `src/components/ui` and code the component
2. Add a file `xyz.md` at `ui-docs/components` with exhaustive examples
3. In `ui-docs/.vitepress/config.ts`, add the component to the sidebar links
2. Add a file `xyz.md` at `docs/components` with exhaustive examples
3. In `docs/.vitepress/config.ts`, add the component to the sidebar links
Make sure to follow the [anatomy of a Component](./using-components#anatomy-of-a-component-file)!

View File

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 117 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -7,17 +7,17 @@
"author": "Funkwhale Collective <contact@funkwhale.audio>",
"scripts": {
"dev": "vite",
"dev:docs": "VP_DOCS=true vitepress dev ui-docs",
"dev:docs": "VP_DOCS=true vitepress dev docs",
"build": "vite build --mode development",
"build:deployment": "vite build",
"build:docs": "VP_DOCS=true vitepress build ui-docs",
"serve:docs": "VP_DOCS=true vitepress serve ui-docs",
"build:docs": "VP_DOCS=true vitepress build docs",
"serve:docs": "VP_DOCS=true vitepress serve docs",
"serve": "vite preview",
"test": "vitest run",
"test:unit": "vitest run --coverage",
"test:generate-mock-server": "msw-auto-mock ../docs/schema.yml -o test/msw-server.ts --node",
"lint": "yarn lint:es && yarn lint:tsc",
"lint:es": "eslint --max-warnings 0 --cache --cache-strategy content --ext .ts,.js,.vue,.json,.html,.cjs . cypress public/embed.html src test ui-docs",
"lint:es": "eslint --max-warnings 0 --cache --cache-strategy content --ext .ts,.js,.vue,.json,.html,.cjs . cypress public/embed.html src test docs",
"lint:tsc": "vue-tsc --noEmit --incremental && tsc --noEmit --incremental --project tsconfig.json",
"generate-types-from-local-schema": "yarn run openapi-typescript ../api/funkwhale_api/common/schema.yml -o src/generated/types.ts",
"generate-types-from-remote-schema": "yarn run openapi-typescript https://docs.funkwhale.audio/develop/swagger/schema.yml -o src/generated/types.ts",

View File

@ -8,7 +8,7 @@ import { type ColorProps, type DefaultProps, type RaisedProps, color } from '~/c
/* TODO: Basic accessibility
-> See ui-docs
-> See docs/
*/

View File

@ -27,7 +27,7 @@
"test/**/*.ts",
"src/docs/vite.config.ts",
"src/docs/**/*.ts",
"ui-docs/**/*.md"
"docs/**/*.md"
],
"vueCompilerOptions": {
"vitePressExtensions": [".md"],

View File

@ -2,6 +2,7 @@ services:
ui:
build:
context: ../app
# The documentation of the UI component library lives within the same NPM package as the Funkwhale app, why we use its container.
dockerfile: Dockerfile.dev
command: yarn dev:docs --host 0.0.0.0
expose: ['5173']
@ -11,6 +12,14 @@ services:
- '../app:/app'
- '/app/node_modules'
networks: ['web']
# We need to overwrite the healthcheck, since the Docker image is actually scoped for running the UI.
healthcheck:
# And we need to talk IPv4, as the busybox prefers IPv6, fails and doesn't fall back to IPv4 for tryping again.
test: ['CMD-SHELL', 'wget --no-verbose --tries=1 --spider http://127.0.0.1:5173/ || exit 1']
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.test-funkwhale-ui-web.rule=Host(`ui.funkwhale.test`)'