powered by create-svelte
;
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
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.
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
npm run check
We use Vitest to unit test. Vitest reports coverage to ./coverage folder.
npm run test
- Single-file component filename casing: filenames of single-file components should be always PascalCase.
- 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. - Tightly coupled component names: child components that are tightly coupled with their parent should include the parent component name as a prefix.
- Order of words in component names: component names should start with the highest-level (often most general) words and end with descriptive modifying words.
- 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