This is a template for developing an app in TypeScript/Electron, Svelte and Tailwind CSS with hot-reloading.
The purpose of this template is enabling hot-reloading for every technology in the app:
tsc-watch./renderer with Rollup.electron-reload.This dev setup will watch on .ts files (TypeScript/Electron client), .js files (Svelte frontend) and index.html.
npm installnpm run cssnpm run startnpm run start bundles the Svelte app into build/client/public/bundle.js with rollup. Changes to the Svelte app will trigger rebundling.rollup spawns a child process to compile the TypeScript/Electron client files into build/client/ with tsc-watch. Changes to the TypeScript/Electron client will trigger recompilation.client/utils/hotReload to hot reload itself with electron-reload whenever changes occur in build/client/renderer/bundle.js (bundled Svelte app) or in client/public/index.html.
© 2020 Iván Ovejero
Distributed under the MIT License. See LICENSE.md