This is a library to build beautiful (win, linux, mac) desktop apps for modern web projects with vite and electron.
Table of Contents
npm install --save vitron
Important NOTE
The README.md
file is under construction ☂ at the moment.
So please stay patient or contribute to it, till it covers all parts ⭐.
To init a project folder with the necessary files, run the command:
npx vitron@latest init
This will create the following files/directories, if they do not already exist:
- src
- entrypoint
- index.ts
- renderer
- index.js
- index.html
- entrypoint
- .electron-builder.yml
The default location of the entrypoint
and renderer
directory can
be changed with a configuration file in the root directory of the project.
Therefore, create a vitron.config.js
file in the root folder with the following content:
module.exports = {
port: 9000,
entrypointDirectory: 'src/entrypoint',
rendererDirectory: 'src/renderer',
}
In a project where Vitron is installed, the vitron binary can be used as npm script.
Alternatively run it directly with npx vitron
.
Here are the default npm scripts in a scaffolded Vitron project:
The best way to use the following commands, is by creating shortcuts in the package.json
file.
{
"scripts": {
"dev": "vitron dev",
"build": "vitron build"
}
}
Made with 💚
Published under MIT License.