This template offers the following things, ready to use, in a dockerized environment:
- Vite
- Svelte 4 (TypeScript)
- ESLint
- Prettier
- Svelte-Check
- Testing Svelte with Vitest & Testing Library
Create with Svelte 4 (default):
npx degit tony-stark-eth/vite-svelte-docker-template app-name
npx degit tony-stark-eth/vite-svelte-docker-template#[email protected] svelte4-app-nameCreate with Svelte 5 (experimental):
npx degit bavragor/vite-svelte-docker-template#release@svelte5 svelte5-app-name- Docker
- make
make setup
make up
make installdocker compose exec app pnpm run devdocker compose exec app pnpm run builddocker compose exec app pnpm run previewdocker compose exec app pnpm run testOr with coverage in build directory
docker compose exec app pnpm run test:coverageIn case your running a setup like me, WSL2 with Ubuntu and have your IDE running on Windows, your IDE may not be able to use symlinks created by pnpm. For this scenario you can do the following
cp .npmrc.dist .npmrc
make build
make up
make install
This will run pnpm without symlinks.
This template also supports git hooks to ensure code quality and consistency before commits and pushes.
These can be activated with:
make git-enable-hooks
Or deactivated with:
make git-disable-hooks