๐ SvelteKit Project Setup / aka Quickstarter
๐ Table of Contents
๐ What does setup.mjs do?
The setup.mjs
script is a custom setup tool for SvelteKit projects. It provides two installation options:
- ๐ Default Install: Automatically installs and configures all available features.
- ๐ Manual Install: Allows you to choose which features to install step-by-step.
- ๐งน Cleans up existing files and folders (except itself)
- ๐ฆ Installs SvelteKit and configures it with adapter-node
- ๐จ Sets up Tailwind CSS and Tailwind Typography
- ๐ฃ Installs Font Awesome icons
- ๐๏ธ Configures PocketBase integration
- ๐ Creates necessary folders and files (e.g., .gitignore, demo page)
- ๐ Updates app.html with dark mode support
- ๐ฑ Creates a layout file with responsive navigation
- โ ๏ธ Creates a custom error page
- ๐ Initializes a git repository (optional)
- ๐โโ๏ธ Starts the development server (optional)
๐ Installed Features
This project includes the following features:
- โ
SvelteKit
- โ
SvelteKit with adapter-node
- โ
Tailwind CSS
- โ
Tailwind Typography
- โ
Font Awesome Icons
- โ
PocketBase
- โ
Svelte Inspector
- โ
Dark mode support
- โ
Responsive navigation
- โ
Custom error page
๐ Getting Started
Clone this repository:
git clone https://github.com/yourusername/sveltekit-quickstart.git
cd sveltekit-quickstart
Set the PB_URL
in your .env
file to your PocketBase server URL:
PB_URL=https://your-pocketbase-url.com
Run the setup script:
node setup.mjs
Run the development server:
npm run dev -- --host --open
Your default browser should open automatically and navigate to the local development server (usually http://localhost:5173
).
๐ Using Svelte Inspector
To activate the Svelte Inspector:
- On macOS: Press
Command + Shift
- On other systems: Press
Ctrl + Shift
The inspector toggle button will always be visible in the bottom-right corner of your app.
For more details on how to use SvelteKit, Tailwind CSS, or any of the other installed features, please refer to their respective documentation:
Happy coding! ๐