Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tony-stark-eth/vite-sveltekit-docker-template
Vite Template for running a SvelteKit App in a Docker Environment
https://github.com/tony-stark-eth/vite-sveltekit-docker-template
docker playwright sveltekit vite vitest
Last synced: 9 days ago
JSON representation
Vite Template for running a SvelteKit App in a Docker Environment
- Host: GitHub
- URL: https://github.com/tony-stark-eth/vite-sveltekit-docker-template
- Owner: tony-stark-eth
- License: bsd-3-clause
- Created: 2024-09-19T19:24:55.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-18T03:09:29.000Z (2 months ago)
- Last Synced: 2024-11-22T02:50:12.467Z (2 months ago)
- Topics: docker, playwright, sveltekit, vite, vitest
- Language: Shell
- Homepage:
- Size: 617 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vite SvelteKit Docker Template
This template offers the following things, ready to use, in a dockerized environment:
- [Vite](https://vitejs.dev/)
- [SvelteKit](https://kit.svelte.dev/) with [Svelte 5](https://svelte.dev/blog/svelte-5-release-candidate) (TypeScript)
- [ESLint](https://www.npmjs.com/package/eslint)
- [Prettier](https://prettier.io/)
- [Svelte-Check](https://www.npmjs.com/package/svelte-check)
- Testing Svelte with [Vitest](https://vitest.dev/) & [Testing Library](https://www.npmjs.com/package/@testing-library/svelte)
- E2E Testing with [Playwright](https://playwright.dev/)## Create with it!
Create with Svelte 5 (experimental):
```sh
npx degit tony-stark-eth/vite-sveltekit-docker-template app-name
```## Requirements
- Docker
- make## Installation
```sh
make setup
make up
make install
```## Development
```sh
docker compose exec app pnpm run dev
```## Build
```sh
docker compose exec app pnpm run build
```## Preview
```sh
docker compose exec app pnpm run preview
```## Test
```sh
docker compose exec app pnpm run test
```Or with coverage in build directory
```sh
docker compose exec app pnpm run test:coverage
```E2E Testing
```sh
docker compose exec app pnpm run test:e2e
```## OS specific settings
### Windows + WSL2 + Symlinks + PNPM
In 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.
## Git Hooks
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
```