Skip to content

u-sho/quantum-game-arena

Repository files navigation

Quantum Game Arena

powered by create-svelte;

Developing

Once you've created a project and installed dependencies with npm instal, start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

Before creating a production version of your app, install an adapter for your target environment. Then:

npm run build

You can preview the built app with npm run preview, regardless of whether you installed an adapter. This should not be used to serve your app in production.

Format & Lint

Please exec formatter & linter before commit.

# check format
npm run format:dry

# fix format
npm run format

# check lint
npm run lint:dry

# fix lint
npm run lint

Typecheck

npm run check

Test

Unit Test

We use Vitest to unit test. Vitest reports coverage to ./coverage folder.

npm run test

Component Naming

  1. Single-file component filename casing: filenames of single-file components should be always PascalCase.
  2. Base component names: base components (a.k.a. presentational, dumb, or pure components) that apply app-specific styling and conventions should all begin with App prefix.
  3. Tightly coupled component names: child components that are tightly coupled with their parent should include the parent component name as a prefix.
  4. Order of words in component names: component names should start with the highest-level (often most general) words and end with descriptive modifying words.
  5. Full-word component names: component names should prefer full words over abbreviations.

The above list is a little bit customized a part of Vue.js Style Guide