tldr/pages/common/elm.md

28 lines
535 B
Markdown
Raw Normal View History

2018-10-03 10:31:36 +01:00
# elm
> Compile and run Elm source files.
2018-10-03 10:31:36 +01:00
- Initialize an Elm project, generates an elm.json file:
2018-10-03 10:31:36 +01:00
`elm init`
2018-10-03 10:31:36 +01:00
- Start interactive Elm shell:
2018-10-03 10:31:36 +01:00
`elm repl`
2018-10-03 10:31:36 +01:00
- Compile an Elm file, output the result to an index.html file:
2018-10-03 10:31:36 +01: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}}`