Written by: Marlon Colca
Posted on 19 Sep 2025 - 15 days ago
typescript nodejs vue games
Let us make sure your tooling is ready so you can iterate quickly without surprises.
Let us make sure your tooling is ready so you can iterate quickly without surprises.
Verify your versions:
node -v
npm -v
If you use nvm
or fnm
, set the proper Node version before continuing.
The package.json
already exposes the commands you will use daily:
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
}
npm run dev
β starts the blazing-fast Vite dev server with hot module replacement.npm run build
β outputs an optimized bundle to dist/
using tsc
for type checks.npm run preview
β spins up a static server so you can experience the production build.src/
ββ components/ # Vue SFCs for UI pieces
ββ composables/ # Game logic and reusable state stores
ββ style.css # Global styles and board layout rules
ββ main.ts # Application bootstrap
Keep the composables/
directory in your sightsβwe will spend a lot of time there.
npm run build
every now and then to ensure the production bundle stays healthy.With a smooth workflow in place, you are ready to dive into the brain of the game. Onward! π§
Time to peek under the hood! The useGame composable orchestrates everything: deck creation, preview timing, scoring, and persistence. We will dissect the most important pieces.
20 Sep 2025 - 14 days ago