Files
tldr/pages.zh/common/scala-cli.md

24 lines
603 B
Markdown
Raw 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.

# scala-cli
> 与Scala编程语言进行交互。
> 更多信息:<https://scala-cli.virtuslab.org/docs/overview/>.
- 使用特定的Scala和JVM版本启动REPL交互式终端
`scala-cli --scala {{3.1.0}} --jvm {{temurin:17}}`
- 编译并运行一个Scala脚本
`scala-cli run {{path/to/script.scala}}`
- 编译并测试一个Scala脚本
`scala-cli test {{path/to/script.scala}}`
- 格式化一个Scala脚本并就地更新文件
`scala-cli fmt {{path/to/script.scala}}`
- 生成IDEVSCode和IntelliJ支持的文件
`scala-cli setup-ide {{path/to/script.scala}}`