[READ-ONLY] Mirror of https://github.com/probablykasper/svelte-template. Svelte + Vite + HMR + TypeScript + Preprocessor support
svelte template
0

Configure Feed

Select the types of activity you want to include in your feed.

25 1 0

Clone this repository

https://tangled.org/kasper.space/svelte-template https://tangled.org/did:plc:acegoe44cjhdakcrqvm6yhf5
git@tangled.org:kasper.space/svelte-template git@tangled.org:did:plc:acegoe44cjhdakcrqvm6yhf5

For self-hosted knots, clone URLs may differ based on your setup.



README.md

Svelte template#

  • Svelte
  • Vite
  • TypeScript
  • svelte-preprocess support with Sass installed by default
  • Hot module replacement
  • Prettier

Limitations:

  • Source maps of .svelte files don't support CSS preprocessors (vite#649) and Pug
  • Linting for code-quality rules is not supported. Would need to use ESLint with eslint-plugin-svelte3, but that plugin needs to work with svelte-preprocess (eslint-plugin-svelte3#10)
  • svelte.svelte-vscode for Svelte
  • syler.sass-indented for Sass
  • esbenp.prettier-vscode for Prettier

Setup#

src/main.ts is built and bundled into build/bundle/.

If you want to add support for Android/iOS/Electron using Capacitor, read Adding Capacitor to an existing web app. Just make sure to set webDir to "build" in capacitor.config.json.

Commands#

Start dev server:

npm run dev

Build and bundle:

npm run build

Lint the project:

npm run lint

Run svelte-check:

npm run check