From 36a8baf3c416d8faf0ef533b1c62f46d2dd56e94 Mon Sep 17 00:00:00 2001 From: Luke Harding Date: Wed, 8 May 2024 11:26:36 -0400 Subject: [PATCH] Init Vite --- client/.vscode/extensions.json | 3 ++ client/README.md | 9 ++++ client/index.html | 13 +++++ client/package.json | 20 +++++++ client/public/vite.svg | 1 + client/src/App.vue | 30 +++++++++++ client/src/assets/vue.svg | 1 + client/src/components/HelloWorld.vue | 38 +++++++++++++ client/src/main.ts | 5 ++ client/src/style.css | 79 ++++++++++++++++++++++++++++ client/src/vite-env.d.ts | 1 + client/tsconfig.json | 25 +++++++++ client/tsconfig.node.json | 11 ++++ client/vite.config.ts | 7 +++ 14 files changed, 243 insertions(+) create mode 100644 client/.vscode/extensions.json create mode 100644 client/README.md create mode 100644 client/index.html create mode 100644 client/package.json create mode 100644 client/public/vite.svg create mode 100644 client/src/App.vue create mode 100644 client/src/assets/vue.svg create mode 100644 client/src/components/HelloWorld.vue create mode 100644 client/src/main.ts create mode 100644 client/src/style.css create mode 100644 client/src/vite-env.d.ts create mode 100644 client/tsconfig.json create mode 100644 client/tsconfig.node.json create mode 100644 client/vite.config.ts diff --git a/client/.vscode/extensions.json b/client/.vscode/extensions.json new file mode 100644 index 0000000..a7cea0b --- /dev/null +++ b/client/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/client/README.md b/client/README.md new file mode 100644 index 0000000..0bfecb0 --- /dev/null +++ b/client/README.md @@ -0,0 +1,9 @@ +# Vue 3 + TypeScript + Vite + +This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` + + diff --git a/client/package.json b/client/package.json new file mode 100644 index 0000000..1aef060 --- /dev/null +++ b/client/package.json @@ -0,0 +1,20 @@ +{ + "name": "personal-tracker-client", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vue-tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "vue": "^3.4.21" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^5.0.4", + "typescript": "^5.2.2", + "vite": "^5.2.0", + "vue-tsc": "^2.0.6" + } +} diff --git a/client/public/vite.svg b/client/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/client/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/src/App.vue b/client/src/App.vue new file mode 100644 index 0000000..bb666a8 --- /dev/null +++ b/client/src/App.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/client/src/assets/vue.svg b/client/src/assets/vue.svg new file mode 100644 index 0000000..770e9d3 --- /dev/null +++ b/client/src/assets/vue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/src/components/HelloWorld.vue b/client/src/components/HelloWorld.vue new file mode 100644 index 0000000..7b25f3f --- /dev/null +++ b/client/src/components/HelloWorld.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/client/src/main.ts b/client/src/main.ts new file mode 100644 index 0000000..2425c0f --- /dev/null +++ b/client/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import './style.css' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/client/src/style.css b/client/src/style.css new file mode 100644 index 0000000..bb131d6 --- /dev/null +++ b/client/src/style.css @@ -0,0 +1,79 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/client/src/vite-env.d.ts b/client/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/client/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/client/tsconfig.json b/client/tsconfig.json new file mode 100644 index 0000000..9e03e60 --- /dev/null +++ b/client/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/client/tsconfig.node.json b/client/tsconfig.node.json new file mode 100644 index 0000000..97ede7e --- /dev/null +++ b/client/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["vite.config.ts"] +} diff --git a/client/vite.config.ts b/client/vite.config.ts new file mode 100644 index 0000000..05c1740 --- /dev/null +++ b/client/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [vue()], +})