A collection of Hello World tutorials of desktop apps built with Electron
š How to run the desktop-app:
cd 1_HelloWorld
npm run dev
š How to run the web-app:
cd 2_HelloWorld_web
npm run dev
and open your ā Local: http://localhost:****/
or start the server and open the app in a new browser tab
npm run dev -- --open
š Electron-vite is a build tool that aims to provide a faster and leaner development experience for Electron.
š The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and Chromium and is used by the Visual Studio Code and many other apps.
š Vite (French word for "quick", pronounced /vit/, like "veet") is a build tool that aims to provide a faster and leaner development experience for modern web projects. It consists of two major parts:
š Svelte is a new way to build web applications. It's a compiler that takes your declarative components and converts them into efficient JavaScript that surgically updates the DOM.
Requires Node.js version 14.18+ and Vite version 3.0+
Just install the Node.js package, it includes both node and npm executables
Vite is resolved within the create-electron tool, no steps required.
use the create-electron tool to scaffold your project:
š npm create @quick-start/electron
Then follow the prompts!
ā Project name: ...electron-vite-app_svelte (usar solo letras minusculas, no espacios) ā Select a framework: āŗ... svelte
ā Add TypeScript? ā¦ No / Yes
ā Add Electron updater plugin? ā¦ No / Yes
ā Enable Electron download mirror proxy? ā¦ No / Yes
Scaffolding project in ./electron-app_svelte...
Done.
See create-vite for more details on each supported template
Currently supported template presets include:
JavaScript | TypeScript |
---|---|
vanilla | vanilla-ts |
vue | vue-ts |
react | react-ts |
svelte | svelte-ts |
solid | solid-ts |
Tambien puedes usar Vite para crear plantillas de proyectos Web.
Use Vite's official create command:
š npm create vite@latest my-vite-project_svelte