Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple elm apps (mains) #261

Open
not-my-profile opened this issue Sep 10, 2021 · 0 comments
Open

Support multiple elm apps (mains) #261

not-my-profile opened this issue Sep 10, 2021 · 0 comments

Comments

@not-my-profile
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant