eg
electron-global
npm i electron-global
eg

electron-global

One Electron instance for multiple apps

by Eryk Rakowski

0.0.2 (see all)License:MITTypeScript:Not Found
npm i electron-global
Readme

electron-global

Travis Downloads PayPal Discord

A tool for building lighweight Electron apps using a global Electron instance. Forget about 100MB for a Hello World app in Electron!

How it works?

electron-global creates a custom Electron distributable with a small app launcher which checks the app's package.json and downloads corresponding major version and the newest in case of minor and patch. The Electron versions are being saved to:

  • on macOS and Linux: ~/.electron-global/x
  • on Windows: %HOMEPATH%/.electron-global/x

Where x is the major version of Electron (e.g. 6).

Then the distributable can be used with electron-builder to build the app installers.

Installation

The electron-builder package is also required to successfully build an app.

$ npm install --save-dev electron-global electron-builder

Usage

You need to create electron-builder.json file in your project directory, configure it and specify electronDist directory to where the electron-global generates the output (default is ./electron-global). Example:

{
  ...
  "electronDist": "./electron-global"
  ...
}

Then you can run the following command (example for macOS):

$ electron-global -m && electron-builder -m

CLI Options:

Usage: electron-global [options]

Options:
  -m, --mac                Create Electron dist for macOS.
  -l, --linux              Create Electron dist for Linux.
  -w, --windows            Create Electron dist for Windows.
  -o, --output <path>      Output path of the created Electron runtime launcher. Defaults to `./dist/runtime`.
  --projectDir, --project  The path to project directory. Defaults to current working directory.
  -h, --help               output usage information

Downloads/wk

0

GitHub Stars

138

LAST COMMIT

2yrs ago

MAINTAINERS

1

CONTRIBUTORS

2

OPEN ISSUES

5

OPEN PRs

0
VersionTagPublished
0.0.2
latest
3yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate