Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TheOtterlord/sveltekit-bun-template
Create a Svelte app, powered by Bun
https://github.com/TheOtterlord/sveltekit-bun-template
bun svelte typescript
Last synced: 3 months ago
JSON representation
Create a Svelte app, powered by Bun
- Host: GitHub
- URL: https://github.com/TheOtterlord/sveltekit-bun-template
- Owner: TheOtterlord
- Created: 2022-07-22T18:11:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-19T09:40:57.000Z (almost 2 years ago)
- Last Synced: 2024-05-11T15:33:57.186Z (6 months ago)
- Topics: bun, svelte, typescript
- Language: JavaScript
- Homepage:
- Size: 48.8 KB
- Stars: 40
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-bun - sveltekit-bun-template
README
# Sveltekit + Bun
Everything you need to build a Svelte project, powered by [Bun](https://bun.sh) and the [`svelte-adapter-bun`](https://github.com/gornostay25/svelte-adapter-bun) package. Based on the [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte) skeleton project.
## Requirements
- Node.js LTS or newer
- Bun## Clone & Setup
```bash
bun create TheOtterlord/sveltekit-bun-template my-project
```## Developing
Once you've created a project and navigated to the root directory of the project, start a development server:
```bash
bun run dev# or start the server and open the app in a new browser tab
bun run dev -- --open
```## Building
To create a production version of your app:
```bash
bun run build
```To skip type-checking when building for production, instead use:
```
bun run build:force
```You can preview the production build with `bun run preview`.
In the production environment, you can use `bun ./build/index.js` to run the production server.## Important notes
- Vite will not type-check on the development server. This is a known issue with Sveltekit and more information can be found [here](https://github.com/ivanhofer/sveltekit-typescript-showcase#type-checking-the-whole-project). Run `bun run check` or `bun run check:watch` if you need type-checking during development.
- The Bun runtime is not used for the development server or any build or check processes. Vite instead uses the Node.js runtime. Bun is only used to run the production server.