← 返回命令列表

Linux command

elm 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize Elm project

elm init

Compile Elm file

elm make [src/Main.elm]

Compile to JavaScript

elm make [src/Main.elm] --output=[main.js]

Start development

elm reactor

Start interactive

elm repl

Install package

elm install [elm/http]

说明

elm is the command-line tool for the Elm programming language, a functional language for frontend web development. It handles project initialization, compilation, package management, and development tools. Elm compiles to JavaScript with no runtime exceptions through its strong type system. The compiler provides friendly error messages that help fix issues. The reactor provides a development server with hot reloading, while repl offers interactive Elm evaluation.

参数

init
Initialize new Elm project.
make _FILE_
Compile Elm source file.
--output _FILE_
Output file path.
--optimize
Enable optimizations.
reactor
Start development server.
repl
Start interactive shell.
install _PACKAGE_
Install Elm package.
diff _PACKAGE_ _V1_ _V2_
Show API differences between package versions.
bump
Bump version based on API changes.
publish
Publish package to the Elm package repository.

FAQ

What is the elm command used for?

elm is the command-line tool for the Elm programming language, a functional language for frontend web development. It handles project initialization, compilation, package management, and development tools. Elm compiles to JavaScript with no runtime exceptions through its strong type system. The compiler provides friendly error messages that help fix issues. The reactor provides a development server with hot reloading, while repl offers interactive Elm evaluation.

How do I run a basic elm example?

Run `elm init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does init do in elm?

Initialize new Elm project.