2018-10-03 10:31:36 +01:00
|
|
|
# elm
|
|
|
|
|
2019-01-07 15:10:29 +00:00
|
|
|
> Compile and run Elm source files.
|
2018-10-03 10:31:36 +01:00
|
|
|
|
2019-01-07 15:10:29 +00:00
|
|
|
- Initialize an Elm project, generates an elm.json file:
|
2018-10-03 10:31:36 +01:00
|
|
|
|
2019-01-07 15:10:29 +00:00
|
|
|
`elm init`
|
2018-10-03 10:31:36 +01:00
|
|
|
|
2019-01-07 15:10:29 +00:00
|
|
|
- Start interactive Elm shell:
|
2018-10-03 10:31:36 +01:00
|
|
|
|
2019-01-07 15:10:29 +00:00
|
|
|
`elm repl`
|
2018-10-03 10:31:36 +01:00
|
|
|
|
2019-01-07 15:10:29 +00:00
|
|
|
- Compile an Elm file, output the result to an index.html file:
|
2018-10-03 10:31:36 +01:00
|
|
|
|
2019-01-07 15:10:29 +00:00
|
|
|
`elm make {{source}}`
|
|
|
|
|
|
|
|
- Compile an Elm file, output the result to a Javascript file:
|
|
|
|
|
|
|
|
`elm make {{source}} --output={{destination}}.js`
|
|
|
|
|
|
|
|
- Start local web server that compiles Elm files on page load:
|
|
|
|
|
|
|
|
`elm reactor`
|
|
|
|
|
|
|
|
- Install Elm package from https://package.elm-lang.org:
|
|
|
|
|
|
|
|
`elm install {{author}}/{{package}}`
|