On Thursday, September 22, 2016 at 9:17:47 AM UTC-6, Rupert Smith wrote:
> On Thursday, September 22, 2016 at 3:12:27 PM UTC+1, OvermindDL1 wrote:
>> You can compile multiple main files together and they will share a 
>> code-base, standard library, and all such.
> I had not considered that - useful if you want to take a one page, one 
> main approach rather than nested TEA with a router in a single main.
> Still, you'd have to compile the components all together at the same time 
> would you not? If I used some components from one auther and some from 
> another, the code sharing would be lost.

Only if they did not pull from the same root library.  With elm make you 
can specify multiple main files and all main files and everything they use 
will be included and all merged into one big javascript.  If you have two 
main files, say MyMain.elm and AnotherMain.elm, then in javascript you can 
instance them via Elm.MyMain.embed(..) and Elm.AnotherMain.embed(..).  It 
is just like compiling a single app, but you just include multiple main 
files (which may indeed be just a simple do-near-nothing main that just 
calls the main of a library). 

You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to