Let's say you have a file Foo.elm with:
module Foo exposing (main)
import Html exposing (..)
main =
div [] [ text "Hello from Foo!" ]
and a second file Bar.elm with:
module Bar exposing (main)
import Html exposing (..)
main =
div [] [ text "Hello from Bar!" ]
elm make let's you compile both apps to a single output file:
% elm make Foo.elm Bar.elm --output out.js
Success! Compiled 2 modules.
Foo ───┬──> out.js
Bar ───┘
Unfortunately this apparently doesn't work with elm-live as it requires a single main.
Let's say you have a file
Foo.elmwith:and a second file
Bar.elmwith:elm makelet's you compile both apps to a single output file:Unfortunately this apparently doesn't work with elm-live as it requires a single main.