twastvedt / gameClock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

game-clock

TODO:

  • Room lifecycle: remove old rooms
  • Player mode: big tile for one player.
  • Flexible player tile layout (see projects/client/src/Grid.ts).
  • Settings config
  • Menu, new game form at /.

Project Setup

  1. Install dependencies
npm install
  1. Copy template.env to .env in the same directory, and modify if necessary (likely no changes needed for a local dev setup).

Compile and Hot-Reload for Development

npm run dev

Or separately:

  • Build and watch TypeScript: npm run watch.
  • Start front-end Vue development server (Vite): npm run dev-client.
  • Start Express development server: npm run dev-server.

Type-Check, Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

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 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:

  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.

Customize configuration

See Vite Configuration Reference.

About


Languages

Language:TypeScript 58.9%Language:Vue 22.3%Language:Shell 11.9%Language:Dockerfile 4.4%Language:HTML 1.4%Language:JavaScript 1.0%Language:SCSS 0.3%