sveltekit-minimalist-template

Sveltekit Minimalist Template

A minimalist Sveltekit template with Prettier & P69. Made to be plundered.

Sveltekit Minimalist Template

A minimalist Sveltekit template with only:

Getting started

1. Install Node v18+

By either:

  1. Installing nvm then:
nvm install 18
nvm use 18
  1. Installing Node v18 directly.

2. Fork and clone

Or clone it first to try out:

git clone https://github.com/PaulioRandall/sveltekit-minimalist-template.git
cd sveltekit-minimalist-template

(Optional) 3. Delete the lock file

For good measure:

rm -f package-lock.json

4. Update package metadata

Update package.json with your project name, repository url, and other metadata.

(Optional) 5. Update dependencies

Including the node version if possible. For most teams it's wise to stay on an LTS version and not upgrade until the next LTS version is both stable and your dependencies are compatible.

6. Install dependencies

npm i

7. Run in dev mode

npm run dev

8. Visit the site

Start modifying at localhost:3000.

9. Commit changes

When you are ready to commit and push changes use the following command to do a full format, build, and test.

npm run commit

You'll know if everything is good because you'll get a curated ASCII scene. This can be changed by modifying ./scripts/youre-ready-to-ship.txt:

                                                ...oo000o.
                                                          00oo.
___ _________  _________  ______  __________  _________        oo.
 -- |       |  |       |  |    |  |        |  |       |  _____    o
___ |       |  | Ready |  | To |  |  Ship  |  |       |  |__D|____][_
 -- |_______|%%|_______|%%|____|%%|________|%%|_______|%%|_~~~~++++~_}
     @~~@~~@    @~~@~~@    @~~@    @~@~~@~@    @~~@~~@    @~~@~~~@~~@

Customise formatting

Modify .prettierrc.json to customise styling. Or replace Prettier with your preferred tool.

Production build warning

Could not detect a supported production environment...

Don't worry if you get a build warning like the one above.

When the time comes to deploy to development and production environments you'll want to research SvelteKit adapters.

I use Vercel to host my personal website so I use @sveltejs/adapter-vercel. There are many others and you can write your own. I've written a custom Express adapter before and it's not too difficult; just a little tedious because they're not easy to test.

Top categories

Loading Svelte Themes