svelte-boilerplate

Sveltekit application boilerplate with tailwindcss, scss, typescript, vitest, playwright, vite, husky, semantic-release, eslint, prettier, commitlint and docker

:warning: Sveltekit still under beta version ( updated until 1.0.0-next.395 ), use it at your own risk. I will try keep update until 1.0 stable release

Preparation

run corepack enable for preparing the required pnpm package manager for our projects ( required Node.js >=16.10 )

corepack enable

Corepack isn't included with Node.js in versions before the 16.10; to address that, run:

npm i -g corepack

After success enable corepack, you should able to run pnpm install:

pnpm install

Install PlayWright for E2E testing framework

npx playwright install

Developing

pnpm dev

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

Commitlint

pnpm cz

Building

To create a production version of your app:

pnpm build

You can preview the production build with pnpm run preview.

Docker Build

docker build -t my-app .

Docker Run

docker run --name my-app -p 4000:3000 my-app

Stop and Remove all docker image

docker stop my-app && docker rm my-app && docker rmi my-app

Top categories

Loading Svelte Themes