viteron vs vite
viteron | vite |
---|---|
v0.x |
v1.0.0-rc.x |
My Belief for viteron
- Show a way of developing desktop apps only web knowledge
- Easy to use
- Be transparent and open to OSS developers
Roadmaps
- first implementation
-
create-viteron-app
- examples
- with-javascript
- with-typescript
- and more...
- documentation (README)
Usage
Create Application with Template
We can use examples/*
as a template.
To create the examples/with-javascript
, run the command below:
# with npm
$ npm init viteron-app MY_APP --example with-javascript
# with yarn
$ yarn create viteron-app MY_APP --example with-javascript
Run Electron with Development Mode
Run npm run dev
, and viteron automatically launches an electron app.
Production Build
Run npm run build
, and viteron outputs packaged bundles under the dist
folder.
Build Options
To build Windows 32 bit version, run npm run build:win32
like below:
CAUTION: To build macOS binary, your host machine must be macOS!
Build Configuration
Edit electron-builder.yml
properties for custom build configuration.
appId: com.example.viteronproductName: My Viteron Appcopyright: Copyright © 2020 Shiono Yoshihidedirectories: output: dist buildResources: resourcesfiles: - from: . filter: - package.json - apppublish: null
For more information, please check out electron-builder official configuration documents.
viteron.config.js
moduleexports = // specify an alternate main src directory, defaults to 'main' mainSrcDir: 'main' // specify an alternate renderer src directory, defaults to 'renderer' rendererSrcDir: 'renderer' // main process' webpack config { // do some stuff here return defaultConfig; };
Additional Entries
moduleexports = Object;
Custom Babel Config
We can extends the default babel config of main process by putting .babelrc
in our project root like this:
.babelrc
:
Examples
See examples folder for more information.
examples/with-javascript
# with npm
$ npm init viteron-app my-app --example with-javascript
# with yarn
$ yarn create viteron-app my-app --example with-javascript
Develop
Basic
$ git clone https://github.com/saltyshiomix/viteron.git
$ cd viteron
$ yarn
$ yarn dev # default is examples/with-javascript
examples/*
Developing $ yarn dev <EXAMPLE-FOLDER-NAME>
Related
License
This project is licensed under the terms of the MIT license.