A SvelteKit 2 template with a few other defaults:
This repository can be cloned using degit
:
# clone `sveltekit-template` into the `my-app` directory
pnpm dlx degit fboulnois/sveltekit-template my-app
Skip this step. This step was already run and is kept for posterity.
This project was created using create-svelte
.
The following steps were run to create this project:
# create a new sveltekit project in the `sveltekit-template` directory
pnpm create svelte sveltekit-template
# add tailwindcss as a postcss plugin
pnpm add -D autoprefixer postcss prettier-plugin-tailwindcss tailwindcss
See the project history for other changes.
Install the dependencies using pnpm install
.
To check the code for issues when developing:
pnpm format
pnpm lint
pnpm check
pnpm audit
To start a development server:
pnpm dev
Unit tests are run using Vitest. To run unit tests:
pnpm test
End-to-end tests are run using Playwright. Install the Playwright dependencies:
pnpm exec playwright install
pnpm exec playwright install-deps
To run end-to-end tests:
pnpm e2e
To create a production version of the app:
pnpm build
The production build can be previewed with pnpm preview
.
To deploy your app, you may need to install an adapter for your target environment.