Finsemble Electron Adapter ⚡
A secure container for building SmartDesktops.
Installation
Grab it from NPM:
yarn add @finsemble/finsemble-electron-adapter
Usage
FEA provides three entry points: app.js
,e2oLauncher
,packager
.
Note: Electron (electron-packager actually) requires that "main" in package.json points to the Electon application entry
point. Therefore, the "exports" from FEA have to come from another file. We therefore manually include "exports.js" in
package.json "files", and anyone that imports (e.g. seed project) must append this to the import:
Example let FEA=require("@finsemble/finsemble-electron-adapter/exports");
app.js
/dist/app.js
is the main Electron application. This is passed as a command line parameter to Electron.
exports.e2oLauncher
e2oLauncher
allows FEA to be launched from a node process (instead of from an Electron exe). It spawns dist/app.js in
a background child process.
Example:
const params = {manifest: "http://localhost:3375/config/manifest.json"}
e2o.e2oLauncher(params,cb)
exports.packager
FEA uses electron-packager
(https://github.com/electron-userland/electron-packager/blob/master/docs/api.md )
electron-wininstaller
(https://github.com/electron/windows-installer) to package and create installers. You must first
create a "package" before creating your "installer". (See electron-packager
for more details.)
FEA provides three utility functions under finsemble-electron-adapter.packager
:
createPackage
,createInstaller
,createFullInstaller
.