Compare commits

..

12 Commits

Author SHA1 Message Date
2279108f31 Update README.md 2025-10-24 22:22:46 +02:00
bdd3c8755b Update README.md 2025-10-24 22:22:19 +02:00
335a81bf9d updated image 2025-10-24 22:21:17 +02:00
926a4c7a66 add image for readme 2025-10-24 22:14:06 +02:00
789c90ed63 added basic readme 2025-10-24 21:54:47 +02:00
0a5fbc92c7 added base path to the vue router 2025-10-24 19:17:55 +02:00
92f6da672b adjusted github actions to use a base path 2025-10-24 19:02:31 +02:00
a2cd25bf5f migrated to bun and also updated the gh actions 2025-10-24 18:59:09 +02:00
65473a085a incremented version of gh pages action 2025-10-24 18:48:08 +02:00
10c846486e added permissions for the gh pages action 2025-10-24 18:43:20 +02:00
e74f56c4aa removed gitlab ci file 2025-10-24 18:30:43 +02:00
e955d9b94d added gh actions for deploying to gh pages
Some checks failed
Deploy to GitHub Pages / deploy (push) Has been cancelled
2025-10-24 18:29:36 +02:00
8 changed files with 118 additions and 5677 deletions

BIN
.github/Board.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

38
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Deploy to GitHub Pages
on:
push:
branches: ["main"] # Replace with your default branch if different
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Build
run: bun run build --base=/dwa/
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@@ -1,18 +0,0 @@
# The Docker image that will be used to build your app
image: node:lts
# Functions that should be executed before the build script is run
before_script:
- npm install
pages:
script:
- npx vite build
- rm -rf public
- mv dist public
artifacts:
paths:
# The folder that contains the files to be exposed at the Page URL
- public
rules:
# This ensures that only pushes to the default branch will trigger
# a pages deploy
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH

View File

@@ -1,18 +1,38 @@
# Vue 3 + TypeScript + Vite
# DWA
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
![](.github/Board.png)
## Recommended IDE Setup
This is a motivational app, where you can track how long you went without accident. You can reset your progress when you have an accident.
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Installation
## Type Support For `.vue` Imports in TS
You can just visit [https://quirinecker.github.io/dwa/](https://quirinecker.github.io/dwa/) and install the PWA on your device via chrome(android)/safari(ios).
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
## Development
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
The project is a Vue3/bun/vite project, so the instructions are relatively straight forward.
### Install dependencies
```bash
bun install
```
### Run the development server
```bash
bun run dev
```
### Build the application
```bash
bun run build
```
### Run the tests
```bash
bun run test
```
1. Disable the built-in TypeScript Extension
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.

BIN
bun.lockb Executable file

Binary file not shown.

View File

@@ -1,47 +1,46 @@
{
"name": "dwa",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build:app": "vue-tsc && vite build",
"build": "pnpm build:app && pnpm build:sw",
"preview": "vite preview",
"build:sw": "workbox generateSW workbox-config.js"
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@vee-validate/zod": "^4.12.5",
"@vue/test-utils": "^2.4.4",
"@vueuse/core": "^10.9.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"lucide-vue-next": "^0.344.0",
"moment": "^2.30.1",
"radix-vue": "^1.4.9",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
"vaul-vue": "^0.1.0",
"vee-validate": "^4.12.5",
"vue": "^3.4.19",
"vue-router": "^4.3.0",
"vue-sonner": "^1.1.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/node": "^20.11.24",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-istanbul": "^1.3.1",
"@vitest/ui": "^1.3.1",
"autoprefixer": "^10.4.18",
"jsdom": "^24.0.0",
"shadcn-vue": "^0.9.0",
"tailwindcss": "^3.4.1",
"typescript": "^5.2.2",
"vite": "^5.1.4",
"vite-plugin-pwa": "^0.19.0",
"vitest": "^1.3.1",
"vue-tsc": "^1.8.27"
}
"name": "dwa",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"build:sw": "workbox generateSW workbox-config.js"
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@vee-validate/zod": "^4.12.5",
"@vue/test-utils": "^2.4.4",
"@vueuse/core": "^10.9.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"lucide-vue-next": "^0.344.0",
"moment": "^2.30.1",
"radix-vue": "^1.4.9",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
"vaul-vue": "^0.1.0",
"vee-validate": "^4.12.5",
"vue": "^3.4.19",
"vue-router": "^4.3.0",
"vue-sonner": "^1.1.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/node": "^20.11.24",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-istanbul": "^1.3.1",
"@vitest/ui": "^1.3.1",
"autoprefixer": "^10.4.18",
"jsdom": "^24.0.0",
"shadcn-vue": "^0.9.0",
"tailwindcss": "^3.4.1",
"typescript": "^5.2.2",
"vite": "^5.1.4",
"vite-plugin-pwa": "^0.19.0",
"vitest": "^1.3.1",
"vue-tsc": "^1.8.27"
}
}

5598
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,11 +8,11 @@ import Detail from '@/pages/Detail.vue'
const app = createApp(App)
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/', component: Home},
{ path: '/:name', component: Detail, props: true}
]
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{ path: '/', component: Home },
{ path: '/:name', component: Detail, props: true }
]
})
app.use(router)