I’ve built an app in Elm. If I do elm compile src/Main.elm, it builds an index.html file that works very nicely when I invoke it.
Following the instructions here: Minification · An Introduction to Elm, I end up with elm.min.js which is somewhat obviously a javascript file. At the risk of sounding like a complete idiot, how do I run that?
Here’s what I’ve tried: I made a small index.html that contains for the body:
<body>
<pre id="elm"></pre>
<script src="elm.min.js"></script>
</body>
And, I tried
<body>
<pre id="elm"></pre>
<script src="elm.js">
var app = Elm.Main.init({ node: document.getElementById("elm") });
</script>
But, neither of these worked, so I’m looking for help.