I can't figure out how to use elm reactor with custom html, an example would help quite a lot I think.
Just going by the documentation, this is what I tried.
This is what my directory looks like:
ProjectRoot
|- elm-stuff
|- build-artifacts (...)
|- packages (...)
|- MyProject
|- Main.elm
|- custom.html
|- elm-package.json
|- elm-js
`custom.html` looks like this.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Main</title>
<style>html, head, body { padding:0; margin:0; }</style>
</head>
<body>
<script type="text/javascript" src="/_reactor/debug.js"></script>
<script type="text/javascript">var main = Elm.fullscreenDebug('MyProject.Main', 'MyProject/Main.elm');</script>
</body>
</html>
I'm not sure it matters but `MyProject/Main.elm` looks like this:
module MyProject.Main where
import Text
main = Text.asText "Hello World"
---
The error shown on the page as well as in the console is just, "Cannot read property 'Main' of undefined"
Indeed, the only modules it has are these ones:
Object.keys(Elm)
> ["Native", "Array", "Basics", "Char", "Color", "Debug", "Dict", "Graphics", "Html", "Json", "List", "Markdown", "Maybe", "fullscreen", "embed", "worker", "Result", "SideBar", "Signal", "Slider", "String", "Text", "Transform2D", "VirtualDom", "Window", "fullscreenDebug"]
I'm not sure where to go at this point. Could anyone share an example showing how to get this up and running?