Skip to content
/ vitron Public
forked from tada5hi/vitron

This is a library to build beautiful (win, linux, mac) desktop apps for modern web projects with vite and electron.

License

Notifications You must be signed in to change notification settings

wzm111/vitron

 
 

Repository files navigation

Vitron 🪔

npm version CI Known Vulnerabilities semantic-release: angular

This is a library to build beautiful (win, linux, mac) desktop apps for modern web projects with vite and electron.

Table of Contents

Installation

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 ⭐.


Setup

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
  • .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',
}

Usage

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"
    }
}

License

Made with 💚

Published under MIT License.

About

This is a library to build beautiful (win, linux, mac) desktop apps for modern web projects with vite and electron.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.4%
  • Smarty 3.8%
  • JavaScript 2.8%
  • Other 1.0%