elm-reactor

Using elm-reactor with Elm embedded in HTML?

╄→гoц情女王★ 提交于 2019-12-23 08:35:30
问题 So I'm trying out Elm and WebRTC together. However for WebRTC I need some interop to javascript. So I created an index.html with the needed script includes, for both WebRTC and main.js. However, I am using elm-reactor. Which is super nice. But there is no main.js. I can create it with elm-make, but then I would have to manually update it. So, is there a way to have elm-reactor work together with embedded elm? Note: I'm using Elm 0.18, latest as of writing. 回答1: If you're willing to hack a bit

Using custom HTML with elm reactor, or another dev server, in 0.19

折月煮酒 提交于 2019-12-12 19:22:30
问题 As this answer shows it's possible in Elm 0.18 to run elm reactor with a custom HTML file if this snippet is included in the HTML file: <script src="/_compile/src/Main.elm"></script> <script> runElmProgram(); </script> In 0.19, however, it doesn't seem like the _compile directory exists or is served anymore. Is there another way to accomplish the same, preferably with elm reactor so as to be able to leverage existing IDE support etc., but I'm interested in any kind of "dev server" solution.