From b29f0e6fac5225ffa35545ae9e8fc68831271d83 Mon Sep 17 00:00:00 2001 From: Rui Alves Date: Wed, 11 Oct 2023 17:26:09 +0100 Subject: [PATCH] scala-cli: add page (#10909) * scala-cli: add page * scala-cli: fix link to docs Co-authored-by: pixel * scala-cli: fix path to script Co-authored-by: pixel * scala-cli: fix path to script Co-authored-by: pixel * scala-cli: fix path to script Co-authored-by: pixel * scala-cli: fix path to script Co-authored-by: pixel * scala-cli: update description Co-authored-by: K.B.Dharun Krishna * scala-cli: update format command description --------- Co-authored-by: pixel Co-authored-by: K.B.Dharun Krishna --- pages/common/scala-cli.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/scala-cli.md diff --git a/pages/common/scala-cli.md b/pages/common/scala-cli.md new file mode 100644 index 000000000..5267a59ad --- /dev/null +++ b/pages/common/scala-cli.md @@ -0,0 +1,24 @@ +# scala-cli + +> Tool to interact with the Scala programming language. +> More information: . + +- Start a REPL (interactive shell) using a specific Scala and JVM version: + +`scala-cli --scala {{3.1.0}} --jvm {{temurin:17}}` + +- Compile and run a Scala script: + +`scala-cli run {{path/to/script.scala}}` + +- Compile and test a Scala script: + +`scala-cli test {{path/to/script.scala}}` + +- Format a Scala script, updating the file in-place: + +`scala-cli fmt {{path/to/script.scala}}` + +- Generate files for IDE (VSCode and IntelliJ) support: + +`scala-cli setup-ide {{path/to/script.scala}}`