Skip to content

elm-electron/electron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-electron

Elm-electron is a (work in progress) integration of electron for Elm.

At the moment, it exposes a limited subset of the electron api. But it should be enough to get you started!

How to

Nota You can find an example of a project integrating elm-electron there

elm-electron is mostly written using the Native elm api. Therefore it is not compatible with the elm-package command. As a result you will have to integrate the code by hand into your projects.

To do so, you will need to integrate the elm-electron sources into your project, in this example we will assume you maintain your elm sources files in an src/ folder.

The folder hierarchy would probably look like:

├── Electron
│   └── IpcRenderer.elm
│   └── Screen.elm
│   └── Shell.elm
├── Native
│   └── IpcRenderer.js
│   └── Screen.js
│   └── Shell.js
├── MyFile.elm
├── MyOtherFile.elm
└── MyOtherOtherFile.elm

And you should make sure your elm-package.json file:

  • adds the elm-electron sources to *source-directories
  • exposes the Electron modules you intend to use
  • activates the usage of native-modules
"source-directories": [
    ".",
    "./src"
],
"exposed-modules": [
    "Electron.IpcRenderer"
],
"native-modules": true,
"elm-version": "0.18.0 <= v < 0.19.0"

You should be done and ready to rock. For more informations on how to actually use the library, please refer to the examples/

About

Electron integration for Elm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published