- Went to elm-lang hopepage, skimmed the initial instructions, went for the Install option so I could develop in my preferred editor (Atom).
- Not obvious where to go next after that, went to the Docs link at the top. Was expecting to find an 'Intro to Elm' guide. In lieu of that, picked the next most obvious thing which was walking through the Quick Start links.
- Skimmed the For JS users documentation. OK, I can follow what is going on in the Elm column. I have a feeling that important details are being glossed over quickly but that's fine.
- Next link is Make an HTML app tutorial which bounces me off to a GitHub project page. Near the top is a block of code without much explanation and some instructions on how to run it in the online editor but nothing about how to run it locally.
- Ran
elm make --help
and saw that it expected an input file - Tried adding the example code to
hello.elm
and ranelm make hello.elm
. This produced an error about an unknownHTML
import. I look in the directory where I ranelm make
and see anelm-package.json
file. That sounds similar topackage.json
so I presume I need to add dependencies to that file. - Went back to the documentation, skimmed the links and tried
the Community packages link.
That page has an example for installing elm-html
under Reliable Versioning. This sounds like the package I want,
so I follow the example and install it via
elm-package install evancz/elm-html
, guessing that I don't need to specify an exact version. This turns out to be correct,elm-package
tells me that it will add what is (presumably) the latest version of the dependency and I confirm. - The initial install fails with a
FailedConnectionException
error. I guess that this could be related to the hotel WiFi connection that I'm using. I retry and the second attempt succeeds. - I retry
elm make hello.elm
, this time it tells me that I'm missing theStartApp.Simple
module. - I search the list of community packages
and find
evancz/start-app
which I install viaelm-package
- I try
elm make hello.elm
again and this successfully compiles and produceselm.js
. - I'm not immediately sure what to do with
elm.js
- I skim through it briefly to see if it has what looks like an init function that I need to invoke but don't see it immediately at the top or bottom of the file. - Going back to the docs, I skim down the list and at the bottom a section
labeled Interop and follow the HTML Embedding
link. This provides me with instructions to use
Elm.embed()
orElm.fullscreen()
which I add to a trivialindex.html
page after a<script src="elm.js">
tag. - It works. Hurrah!
Created
November 14, 2015 07:29
-
-
Save robertknight/969002c9235c498c7251 to your computer and use it in GitHub Desktop.
Elm setup notes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment