close
Skip to content

Support multiple elm apps (mains) #261

@not-my-profile

Description

@not-my-profile

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions