commit 890a654729084e64508d53d8847bc69facfdf1b3 Author: SkyLi Date: Sat Aug 1 14:54:07 2026 +0800 initial commit diff --git a/ti2026h-web/.gitignore b/ti2026h-web/.gitignore new file mode 100644 index 0000000..cd68f14 --- /dev/null +++ b/ti2026h-web/.gitignore @@ -0,0 +1,39 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +*.tsbuildinfo + +.eslintcache + +# Cypress +/cypress/videos/ +/cypress/screenshots/ + +# Vitest +__screenshots__/ + +# Vite +*.timestamp-*-*.mjs diff --git a/ti2026h-web/.vscode/extensions.json b/ti2026h-web/.vscode/extensions.json new file mode 100644 index 0000000..a7cea0b --- /dev/null +++ b/ti2026h-web/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/ti2026h-web/README.md b/ti2026h-web/README.md new file mode 100644 index 0000000..1f86039 --- /dev/null +++ b/ti2026h-web/README.md @@ -0,0 +1,42 @@ +# ti2026h-web + +This template should help get you started developing with Vue 3 in Vite. + +## Recommended IDE Setup + +[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). + +## Recommended Browser Setup + +- Chromium-based browsers (Chrome, Edge, Brave, etc.): + - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd) + - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters) +- Firefox: + - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/) + - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/) + +## Type Support for `.vue` Imports in TS + +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 [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. + +## Customize configuration + +See [Vite Configuration Reference](https://vite.dev/config/). + +## Project Setup + +```sh +pnpm install +``` + +### Compile and Hot-Reload for Development + +```sh +pnpm dev +``` + +### Type-Check, Compile and Minify for Production + +```sh +pnpm build +``` diff --git a/ti2026h-web/env.d.ts b/ti2026h-web/env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/ti2026h-web/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/ti2026h-web/index.html b/ti2026h-web/index.html new file mode 100644 index 0000000..9e5fc8f --- /dev/null +++ b/ti2026h-web/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
+ + + diff --git a/ti2026h-web/package.json b/ti2026h-web/package.json new file mode 100644 index 0000000..d84b900 --- /dev/null +++ b/ti2026h-web/package.json @@ -0,0 +1,30 @@ +{ + "name": "ti2026h-web", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "run-p type-check \"build-only {@}\" --", + "preview": "vite preview", + "build-only": "vite build", + "type-check": "vue-tsc --build" + }, + "dependencies": { + "vue": "^3.5.40" + }, + "devDependencies": { + "@tsconfig/node24": "^24.0.4", + "@types/node": "^24.13.3", + "@vitejs/plugin-vue": "^6.0.8", + "@vue/tsconfig": "^0.9.1", + "npm-run-all2": "^9.0.2", + "typescript": "~6.0.0", + "vite": "^8.1.5", + "vite-plugin-vue-devtools": "^8.1.5", + "vue-tsc": "^3.3.7" + }, + "engines": { + "node": "^22.18.0 || >=24.12.0" + } +} diff --git a/ti2026h-web/public/favicon.ico b/ti2026h-web/public/favicon.ico new file mode 100644 index 0000000..df36fcf Binary files /dev/null and b/ti2026h-web/public/favicon.ico differ diff --git a/ti2026h-web/src/App.vue b/ti2026h-web/src/App.vue new file mode 100644 index 0000000..abfd315 --- /dev/null +++ b/ti2026h-web/src/App.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/ti2026h-web/src/main.ts b/ti2026h-web/src/main.ts new file mode 100644 index 0000000..01433bc --- /dev/null +++ b/ti2026h-web/src/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/ti2026h-web/tsconfig.app.json b/ti2026h-web/tsconfig.app.json new file mode 100644 index 0000000..c0f2d86 --- /dev/null +++ b/ti2026h-web/tsconfig.app.json @@ -0,0 +1,18 @@ +{ + "extends": "@vue/tsconfig/tsconfig.dom.json", + "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], + "exclude": ["src/**/__tests__/*"], + "compilerOptions": { + // Extra safety for array and object lookups, but may have false positives. + "noUncheckedIndexedAccess": true, + + // Path mapping for cleaner imports. + "paths": { + "@/*": ["./src/*"] + }, + + // `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking. + // Specified here to keep it out of the root directory. + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo" + } +} diff --git a/ti2026h-web/tsconfig.json b/ti2026h-web/tsconfig.json new file mode 100644 index 0000000..66b5e57 --- /dev/null +++ b/ti2026h-web/tsconfig.json @@ -0,0 +1,11 @@ +{ + "files": [], + "references": [ + { + "path": "./tsconfig.node.json" + }, + { + "path": "./tsconfig.app.json" + } + ] +} diff --git a/ti2026h-web/tsconfig.node.json b/ti2026h-web/tsconfig.node.json new file mode 100644 index 0000000..c9b2bad --- /dev/null +++ b/ti2026h-web/tsconfig.node.json @@ -0,0 +1,27 @@ +// TSConfig for modules that run in Node.js environment via either transpilation or type-stripping. +{ + "extends": "@tsconfig/node24/tsconfig.json", + "include": [ + "vite.config.*", + "vitest.config.*", + "cypress.config.*", + "playwright.config.*", + "eslint.config.*" + ], + "compilerOptions": { + // Most tools use transpilation instead of Node.js's native type-stripping. + // Bundler mode provides a smoother developer experience. + "module": "preserve", + "moduleResolution": "bundler", + + // Include Node.js types and avoid accidentally including other `@types/*` packages. + "types": ["node"], + + // Disable emitting output during `vue-tsc --build`, which is used for type-checking only. + "noEmit": true, + + // `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking. + // Specified here to keep it out of the root directory. + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo" + } +} diff --git a/ti2026h-web/vite.config.ts b/ti2026h-web/vite.config.ts new file mode 100644 index 0000000..0414681 --- /dev/null +++ b/ti2026h-web/vite.config.ts @@ -0,0 +1,18 @@ +import { fileURLToPath, URL } from 'node:url' + +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueDevTools from 'vite-plugin-vue-devtools' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [ + vue(), + vueDevTools(), + ], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)), + }, + }, +})