An open API service indexing awesome lists of open source software.

https://github.com/savagecore/vite-svelte-starter

Currently in "production" @ https://savagecore.github.io/pd3-vault-cracker/
https://github.com/savagecore/vite-svelte-starter

boilerplate coverage eslint husky i18n localisation picocss prettier svelte svelte-i18n template vite vitest

Last synced: 3 months ago
JSON representation

Currently in "production" @ https://savagecore.github.io/pd3-vault-cracker/

Awesome Lists containing this project

README

        


build status
Coverage

Svelte + Pico.css + TypeScript + Vite


svelte-i18n + Prettier + ESLint + Vitest + Husky

This template is based on the official [Vite + Svelte template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-svelte-ts).

## Packages added to the template

- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [Husky](https://github.com/typicode/husky)
- [Vitest](https://vitest.dev/)
- [Pico.css](https://picocss.com/)
- [svelte-i18n](https://github.com/kaisermann/svelte-i18n)
- [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess)
- [prettier-plugin-css-order](https://github.com/Siilwyn/prettier-plugin-css-order)
- [sass](https://sass-lang.com/)
- [vite-plugin-pwa](https://vite-pwa-org.netlify.app/)
- [autoprefixer](https://github.com/postcss/autoprefixer)
- [vite-plugin-mkcert](https://www.npmjs.com/package/vite-plugin-mkcert)

## Recommended IDE Setup

[VS Code](https://code.visualstudio.com/) - recommendations are included.

## Getting started

```bash
pnpm dlx tiged "SavageCore/vite-svelte-starter" my-app
cd my-app
pnpm install
pnpm dev # local access
pnpm dev:remote # lan access
```

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

## Coverage

[Codecov](https://codecov.io/) 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](https://app.codecov.io/) should guide you through it. See the [docs](https://docs.codecov.com/docs#step-2-get-the-repository-upload-token) 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://.github.io/`, you can omit base as it defaults to '/'.

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

See [Vite Docs](https://vitejs.dev/guide/static-deploy.html#github-pages) for more information.