Compare commits
12 Commits
b080146017
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2279108f31 | |||
| bdd3c8755b | |||
| 335a81bf9d | |||
| 926a4c7a66 | |||
| 789c90ed63 | |||
| 0a5fbc92c7 | |||
| 92f6da672b | |||
| a2cd25bf5f | |||
| 65473a085a | |||
| 10c846486e | |||
| e74f56c4aa | |||
| e955d9b94d |
BIN
.github/Board.png
vendored
Normal file
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
38
.github/workflows/main.yml
vendored
Normal 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
|
||||
@@ -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
|
||||
42
README.md
42
README.md
@@ -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.
|
||||

|
||||
|
||||
## 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.
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build:app": "vue-tsc && vite build",
|
||||
"build": "pnpm build:app && pnpm build:sw",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"build:sw": "workbox generateSW workbox-config.js"
|
||||
},
|
||||
|
||||
5598
pnpm-lock.yaml
generated
5598
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ import Detail from '@/pages/Detail.vue'
|
||||
const app = createApp(App)
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{ path: '/', component: Home },
|
||||
{ path: '/:name', component: Detail, props: true }
|
||||
|
||||
Reference in New Issue
Block a user