tldr/pages/common/elm.md

29 lines
581 B
Markdown
Raw Normal View History

2018-10-03 10:31:36 +01:00
# elm
> Compile and run Elm source files.
2019-06-08 01:04:00 +01:00
> More information: <https://elm-lang.org>.
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}}`