electron-svelte-typescript-boilerplate

Electron Svelte Typescript Boilerplate

Minimal electron boilerplate with Svelte and Typescript support

svelte-electron-ts-starter

Features

  • electron-builder for building complete apps.
  • Hot Reload
  • Preconfigured Context Bridge for building secure best practice Electron App.
  • Write Typescript in Main Process and in Svelte Components.
  • Minimal, easy to digest starting point.

Installation

Clone repository to get started

In Project Directory

npx degit KlassyKat/electron-svelte-typescript-boilerplate
npm install

Or to create new project directory

npx degit KlassyKat/electron-svelte-typescript-boilerplate <app-name>
cd <app-name>
npm install

Develop

Start watching project files with rollup

npm run dev

In another terminal start electron

npm run start

You could moify the package.json to run these commands together in the same terminal with something like concurrently but I prefer the terminal output having these seperate.

Build

This template uses electron-builder for building out electron apps. This boilerplate does some configuration in package.json to give a feel for it and give some good defaults but it's reccomended you take a look at electron-builder as every project has its own requirements.

Respective build commands are

npm run build:all
npm run build:win
npm run build:linux
npm run build:mac

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes