This module lets you write desktop applications (for Mac, Linux, and Windows) in Elm. You must use the elm-desktop-app
command line tool to build your program.
(
DesktopApp.program will do nothing if you try to use it in a web browser.)
See the README for an example of how to set up and build your application.
This is the type for your Elm program when using DesktopApp.program
For example:
module Main exposing (main)
import DesktopApp
type alias Model = { ... }
type Msg = ...
main : DesktopApp.Program Model Msg
main =
DesktopApp.program { ... }This is the Model type for your Elm program when using DesktopApp.program.
Normally you won't need to refer to this directly -- use Program instead.
This is the Msg type for your Elm program when using DesktopApp.program.
Normally you won't need to refer to this directly -- use Program instead.
Use this to define your
mainin yourMain.elmfile, and then use theelm-desktop-appcommand line tool to build your app.init,update,subscription,view: These are the same as in any Elm program.persistence: This specifies how the data for you app will be saved to the user's filesystem. (IfNothing, then you app will not persist any data.)