Skip to content

SavageCore/vite-svelte-starter

Repository files navigation

build status Coverage

Svelte + Pico.css + TypeScript + Vite

svelte-i18n + Prettier + ESLint + Vitest + Husky

This template is based on the official Vite + Svelte template.

Packages added to the template

Recommended IDE Setup

VS Code - recommendations are included.

Getting started

npx tiged "SavageCore/vite-svelte-starter" my-app
cd my-app
npm install
npm run dev # local access
npm run dev:remote # lan access

Note: On first run, you may be prompted for sudo access to install vite-plugin-mkcert certificates.

Coverage

Codecov is used to track coverage. To enable coverage tracking, you need to add your CODECOV_TOKEN as a repository secret. Selecting setup repo on your Codecov dashboard should guide you through it. See the docs for more.

Publishing

This template is configured to publish to GitHub Pages. To publish your app push a new tag (starting with v) to the repo. This will trigger a GitHub Action that will build and publish your app to GitHub Pages.

  1. On the Settings page of your repo, under Pages, select the gh-pages branch as the source for your GitHub Pages site.

  2. Set the correct base in vite.config.ts.

    If you are deploying to https://<USERNAME>.github.io/, you can omit base as it defaults to '/'.

    If you are deploying to https://<USERNAME>.github.io/<REPO>/, for example your repository is at https://github.com/<USERNAME>/<REPO>, then set base to '/<REPO>/'.

See Vite Docs for more information.