A Vue.js application for managing Pathfinder honors, built with Vite, TypeScript, and Pinia.
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
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) to make the TypeScript language service aware of .vue types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensionsfrom VSCode's command palette - Find
TypeScript and JavaScript Language Features, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Windowfrom the command palette.
yarn installThe application uses Vite for fast development with hot module replacement:
yarn devThis will start the development server at http://localhost:3000 using the production API by default.
To run the application against your local API development environment instead of the production API:
Open the Run and Debug panel in VS Code (Ctrl+Shift+D / Cmd+Shift+D) and select:
- "Launch Vite Dev (Local API)" - Uses your local API at
https://localhost:5001 - "Launch Vite Dev (Production API)" - Uses the production API
- Local API:
yarn dev:local- Uses your local API athttps://localhost:5001 - Production API:
yarn dev:prod- Uses the production API - Default:
yarn dev- Uses the production API (same asdev:prod)
-
Copy the example environment file:
cp env.local.example .env.local
-
Edit
.env.localand configure your local API settings:# Set to 'true' to use local API instead of production VITE_USE_LOCAL_API=true # Local API URL (defaults to https://localhost:5001 if not set) VITE_LOCAL_API_URL=https://localhost:5001
-
Start the development server:
yarn dev
When running in development mode, the application will log the current API configuration to the browser console, showing whether it's using the local or production environment.
yarn run buildyarn run previewRun Unit Tests with Vitest
yarn run test:unityarn run test:unit:watchyarn run test:storesyarn run typecheckLint with ESLint
yarn run lintSee Vite Configuration Reference for more details about customizing the build process.