Gizra / seemsSo

0 stars 0 forks source link

Add Elm app, and inject via JS #4

Closed amitaibu closed 7 years ago

amitaibu commented 7 years ago

Pass JS settings to the page

amitaibu commented 7 years ago

welcome_to_seemsso_

amitaibu commented 7 years ago

@rgrempel a hybrid site: Yesod serving the page, along with an embedded Elm app

rgrempel commented 7 years ago

Fascinating ... that should be very nice indeed.

If I understand it correctly, you're doing separate compilation of the Elm code (as a separate build step, external to Yesod), and then taking the resulting JS and integrating it into Yesod the same way you'd integrate any external JS.

One of the things I'd like to play with someday is actually integrating the Elm compiler into a Yesod workflow more tightly, so that yesod devel would actually watch the Elm source, notice changes, compile the Elm code, and include the resulting JS. And without having Elm separately installed -- since we're in a Haskell environment here anyway, we could use Elm as a Haskell library (i.e. use the Haskell internals of elm-package and elm-make directly, rather than running them from a command-line). So, sort of like Lucius, Cassius and Julius, but for Elm -- perhaps Elmius?

Anyway, I think it would be an interesting thing to play with on a rainy day.