svelte-electron-template

Svelte Electron Template

Svelte Electron Template

Svelte Electron Template

This is a project template for Svelte app with electron.

To create a new project based on this template using degit:

npx degit zinsani/svelte-electron-template my-app
cd my-app

Note that you will need to have Node.js installed.

Get started

Install the dependencies...

cd my-app
npm install

...then start electron

npm start

Building and running in production mode

To create an optimised version of the app:

npm run build

To package app with electron-builder for windows platform

npm run dist

Using TypeScript

This template comes with a script to set up a TypeScript development environment, you can run it immediately after cloning the template with:

node scripts/setupTypeScript.js

Or remove the script via:

rm scripts/setupTypeScript.js

If you want to use baseUrl or path aliases within your tsconfig, you need to set up @rollup/plugin-alias to tell Rollup to resolve the aliases. For more info, see this StackOverflow question.

Top categories

Loading Svelte Themes