[READ-ONLY] Mirror of https://github.com/probablykasper/capacitor-svelte-snowpack-template.
capacitor svelte template
0

Configure Feed

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

TypeScript 42.3%
Svelte 24.5%
JavaScript 23.8%
HTML 9.4%
16 1 0

Clone this repository

https://tangled.org/kasper.space/capacitor-svelte-snowpack-template https://tangled.org/did:plc:ma6yiqtkhqad7ravn2g5or72
git@tangled.org:kasper.space/capacitor-svelte-snowpack-template git@tangled.org:did:plc:ma6yiqtkhqad7ravn2g5or72

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



README.md

Svelte template#

Features:

  • Svelte
  • Snowpack with esbuild enabled
  • TypeScript
  • svelte-preprocess support with Pug and Sass installed by default
  • Hot module replacement
  • Prettier

Limitations:

  • Source maps are supported for .ts and .svelte files, but not for the preprocessors used inside .svelte files
  • 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 (issue)
  • 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#

npm run start#

Starts dev server

npm run build#

Builds and bundles

npm run lint#

Lint the project

npm run check#

Run svelte-check