Files
tldr/pages.zh/common/elm.md

28 lines
598 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# elm
> 编译和运行 Elm 源文件。
> 更多信息:<https://elm-lang.org>。
- 初始化一个 Elm 项目,生成一个 elm.json 文件:
`elm init`
- 启动交互式 Elm Shell
`elm repl`
- 编译一个 Elm 文件,将结果输出到 `index.html` 文件:
`elm make {{source}}`
- 编译一个 Elm 文件,将结果输出到 JavaScript 文件:
`elm make {{source}} --output={{destination}}.js`
- 启动本地 Web 服务器,在页面加载时编译 Elm 文件:
`elm reactor`
-<https://package.elm-lang.org> 安装 Elm 包:
`elm install {{author}}/{{package}}`