Skip to content

Commit ac3efe4

Browse files
authored
NIT Improve some website docs (#1243)
1 parent bb57362 commit ac3efe4

File tree

13 files changed

+51
-51
lines changed

13 files changed

+51
-51
lines changed

website/docs/_scala-ecosystem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 31
44
---
55

66
:::note
7-
This page is interested in the future of Scala ecosystem.
7+
This page concerns the future of the Scala ecosystem.
88

99
If you just want to learn Scala CLI just head out to the [Commands section](./commands/basics.md)
1010
:::

website/docs/commands/basics.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Basics
33
sidebar_position: 3
44
---
55

6-
Scala CLI is a command line tool that executes a given command on the inputs it’s provided with a given [configuration](../guides/configuration.md) to produce a result.
6+
Scala CLI is a command line tool that executes a given command on the inputs it’s provided with, using a given [configuration](../guides/configuration.md) to produce a result.
77

88
The most important commands are:
99

@@ -22,10 +22,10 @@ The `scala-cli` CLI commands accept input in a number of ways, most notably:
2222

2323
- as source files
2424
- as one or several directories that contain source files
25-
- as URLs, pointing to sources
25+
- as URLs pointing to sources
2626
- by processing source code via piping or process substitution
2727

28-
Note that all of these input formats can used alongside each other.
28+
Note that all of these input formats can be used alongside each other.
2929

3030
## Source files
3131

@@ -35,7 +35,7 @@ Scala CLI accepts the following types of source code:
3535
- `.sc` files, containing Scala scripts (see more in [Scripts guide](../guides/scripts.md))
3636
- `.java` files, containing Java code
3737

38-
This example shows the simplest input format.
38+
The following example shows the simplest input format.
3939
First, create a source file:
4040

4141
```scala title=Hello.scala
@@ -86,7 +86,7 @@ compilation will fail. `scala-cli` compiles only the files it’s given.
8686
:::
8787

8888
While this is *very* convenient for projects with just a few files, passing many files this way can be cumbersome and error-prone.
89-
For larger projects, directories can help.
89+
In the case of larger projects, passing whole directories can help.
9090

9191

9292
## Directories
@@ -108,7 +108,7 @@ object Hello {
108108
}
109109
```
110110

111-
For this case, run all the source code files in `my-app` by supplying the directory name:
111+
In this case, you can run all the source code files in `my-app` by supplying the directory name:
112112

113113
```bash
114114
scala-cli my-app
@@ -152,7 +152,7 @@ scala-cli https://gist.github.com/alexarchambault/7b4ec20c4033690dd750ffd601e540
152152

153153
### Zip archive
154154

155-
`scala-cli` accepts input via `zip` archive path
155+
`scala-cli` accepts inputs via a `zip` archive path.
156156
It unpacks the archive and runs it:
157157

158158
```scala titleHello.scala
@@ -194,7 +194,7 @@ More details in the [Piping guide](../guides/piping.md).
194194

195195
## Scala CLI version
196196

197-
`scala-cli` can also run another Scala CLI version, which can be helpful to test unreleased yet Scala CLI functionality.
197+
`scala-cli` can also run another Scala CLI version, which can be helpful to test unreleased Scala CLI functionalities.
198198
:::warning
199199
Running another Scala CLI version might be slower because it uses JVM-based Scala CLI launcher.
200200
:::

website/docs/commands/clean.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ title: Clean
33
sidebar_position: 16
44
---
55

6-
The `clean` command deletes all of the files that are generated by `scala-cli`. This includes the `.scala-build` directory where Scala CLI writes outputs and stores its caches.
6+
The `clean` command deletes all of the files generated by `scala-cli`. This includes the `.scala-build` directory where Scala CLI writes outputs and stores its caches, and `.bsp/scala-cli.json` file which contains details for the BSP connection (necessary for importing a Scala CLI build to your IDE of choice).

website/docs/commands/compile.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ scala-cli compile Hello.scala
1717
```
1818

1919
Note that most Scala CLI commands automatically compile your code, if necessary.
20-
The `compile` command is useful if you'd like to check that your code compiles,
21-
or know of compilation warnings, without running it or packaging it.
20+
The `compile` command is useful if you want to check that your code compiles
21+
(or to see the compilation warnings, if any occur) without running it or packaging it.
2222

2323
The most common `compile` options are shown below.
2424
For a full list of options, run `scala-cli compile --help`, or check the options linked in the
@@ -87,7 +87,7 @@ For compiling with an specific nightly build, you have the full version for:
8787
scala-cli Hello.scala -S 2.13.9-bin-4505094
8888
```
8989

90-
For adding this inside scala files with [using directives](../guides/using-directives.md), use:
90+
For setting this inside scala files, use [`using` directives](../guides/using-directives.md):
9191

9292
```scala
9393
//> using scala "2.nightly"

website/docs/commands/fmt.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ scala-cli fmt --check
2222

2323
### Scalafmt version and dialect
2424

25-
Scala CLI `fmt` command supports passing the `scalafmt` **version** and **dialect** directly from the command line, using respectively the `--scalafmt-dialect` and `--scalafmt-version` options:
25+
Scala CLI `fmt` command supports passing the `scalafmt` **version** and **dialect** directly from the command line, using the `--scalafmt-dialect` and `--scalafmt-version` options respectively:
2626
```
2727
scala-cli fmt --scalafmt-dialect scala3 --scalafmt-version 3.5.8
2828
```
29-
You can skip passing either of those, which will make Scala CLI to infer a default value:
29+
You can skip passing either of those, which will make Scala CLI infer a default value:
3030
- If a `.scalafmt.conf` file is present in the workspace and it has the field defined, the value will be read from there, unless explicitly specified with Scala CLI options.
31-
- Otherwise, the default `scalafmt` **version** will be the latest one used by your Scala CLI version (so it is subject to change when updating Scala CLI). The default **dialect** will be inferred based on Scala version (defined explicitly by `-S` option, or default version if option would not be passed).
31+
- Otherwise, the default `scalafmt` **version** will be the latest one used by your Scala CLI version (so it is subject to change when updating Scala CLI). The default **dialect** will be inferred based on the Scala version (defined explicitly by `-S` option, or default version if the option is not passed).
3232

33-
It is possible to pass the configuration as a string directly from the command line, using `--scalafmt-conf-str` option. If the configuration is passed this way, Scala CLI will behave exactly the same as if it would find the specified configuration in a `.scalafmt.conf` file in the workspace.
33+
It is possible to pass the configuration as a string directly from the command line, using `--scalafmt-conf-str` option. If the configuration is passed this way, Scala CLI will behave exactly the same as if it found the specified configuration in the `.scalafmt.conf` file in the workspace.
3434

3535
#### Example 1
3636

@@ -43,7 +43,7 @@ runner.dialect = scala212
4343
scala-cli fmt --scalafmt-dialect scala213
4444
```
4545

46-
For above setup `fmt` will use:
46+
For the setup above, `fmt` will use:
4747
- `version="3.5.8"` from the file
4848
- `dialect=scala213`, because passed `--scalafmt-dialect` option overrides dialect found in the file
4949

@@ -57,7 +57,7 @@ version = "2.7.5"
5757
scala-cli fmt --scalafmt-version 3.5.8
5858
```
5959

60-
For above setup `fmt` will use:
60+
For the setup above, `fmt` will use:
6161
- `version="3.5.8"`, because passed `--scalafmt-version` option overrides version from the file
6262
- `dialect=scala3`, because dialect is neither passed as an option nor is it present in the configuration file, so it is inferred based on the Scala version; the Scala version wasn't explicitly specified in the command either, so it falls back to the default Scala version - the latest one, thus the resulting dialect is `scala3`.
6363

@@ -171,5 +171,5 @@ If the `--save-scalafmt-conf` option is passed, then `fmt` command behaves as fo
171171
- In the **third** case `fmt` creates a `.scalafmt.conf` file in the current workspace directory, writes [inferred](/docs/commands/fmt#scalafmt-version-and-dialect) version and dialect into it and uses it to run `scalafmt`.
172172

173173
:::note
174-
If the configuration is passed in the `--scalafmt-conf-str` option, Scala CLI will behave exactly the same as if it would find the specified configuration in a `.scalafmt.conf` file in the workspace.
174+
If the configuration is passed in the `--scalafmt-conf-str` option, Scala CLI will behave exactly the same as if it found the specified configuration in a `.scalafmt.conf` file in the workspace.
175175
:::

website/docs/commands/misc/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_position: 1
55

66
import {ChainedSnippets} from "../../../src/components/MarkdownComponents.js";
77

8-
The `config` sub-command allows to get and set various configuration values, used by
8+
The `config` sub-command makes it possible to get and set various configuration values, used by
99
other Scala CLI sub-commands.
1010

1111
Examples of use:

website/docs/commands/misc/pgp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The `pgp` sub-commands are low-level commands, exposing the PGP capabilities of
77
Scala CLI. These capabilities are used in the `publish` and `publish setup` commands
88
in particular.
99

10-
These commands allow to
10+
These commands make it possible to
1111
- create PGP keys with `pgp create`
1212
- get a key fingerprint with `pgp key-id`
1313
- push them to / pull them from key servers with `pgp push` / `pgp pull`

website/docs/commands/package.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ The `package` command can package your Scala code in various formats, such as:
1818
The default package format writes a *lightweight launcher JAR*, like the "bootstrap" JAR files [generated by coursier](https://get-coursier.io/docs/cli-bootstrap#bootstraps).
1919
These JARs tend to have a small size (mostly containing only the byte code from your own sources),
2020
can be generated fast,
21-
and download their dependencies upon first launch, via [coursier](https://get-coursier.io).
21+
and download their dependencies upon first launch via [coursier](https://get-coursier.io).
2222

23-
These can be copied onto other machines, and will run fine there.
23+
Such JARs can be copied to other machines, and will run fine there.
2424
Their only requirement is that the `java` command needs to be available in the `PATH`:
2525

2626
```scala title=Hello.scala
@@ -101,11 +101,11 @@ Hello
101101

102102
Scala CLI can create an executable application and package it into a docker image.
103103

104-
For example, here’s an application that will be executed in a docker container:
104+
For example, here’s an application that will be executed in a docker container:
105105

106106
```scala title=HelloDocker.scala
107107
object HelloDocker extends App {
108-
println("Hello from Docker")
108+
println("Hello from Docker")
109109
}
110110
```
111111

@@ -133,7 +133,7 @@ Hello from Docker
133133
-->
134134

135135
You can also create Docker images for Scala.js and Scala Native applications.
136-
This command shows how to create a Docker image (`--docker`) for a Scala.js (`--js`) application:
136+
The following command shows how to create a Docker image (`--docker`) for a Scala.js (`--js`) application:
137137

138138
```bash
139139
scala-cli package --js --docker HelloDocker.scala --docker-image-repository hello-docker
@@ -145,7 +145,7 @@ docker run hello-docker:latest
145145

146146
Packaging Scala Native applications to a Docker image is only supported on Linux.
147147

148-
This command shows how to do that:
148+
The following command shows how to do that:
149149

150150
```bash ignore
151151
scala-cli package --native --docker HelloDocker.scala --docker-image-repository hello-docker
@@ -163,7 +163,7 @@ scala-cli package --docker HelloDocker.scala --docker-from openjdk:11 --docker-i
163163

164164
## Scala.js
165165

166-
Packaging Scala.js applications results in a `.js` file, that can be run with `node`:
166+
Packaging Scala.js applications results in a `.js` file, which can be run with `node`:
167167

168168
<!-- TODO: add something js specific -->
169169

@@ -185,12 +185,12 @@ Hello
185185
-->
186186

187187

188-
Note that Scala CLI doesn't offer to link the resulting JavaScript with linkers, such as Webpack (yet).
188+
Note that Scala CLI doesn't offer the ability to link the resulting JavaScript with linkers, such as Webpack (yet).
189189

190190
## Native image
191191

192192
[GraalVM native image](https://www.graalvm.org/22.0/reference-manual/native-image/)
193-
allows to build native executables out of JVM applications. It can
193+
makes it possible to build native executables out of JVM applications. It can
194194
be used from Scala CLI to build native executables for Scala applications.
195195

196196
<!-- clear -->
@@ -217,8 +217,8 @@ using the [JVM management capabilities of coursier](https://get-coursier.io/docs
217217

218218
Several options can be passed to adjust the GraalVM version used by Scala CLI:
219219
- `--graalvm-jvm-id` accepts a JVM identifier, such as `graalvm-java17:22.0.0` or `graalvm-java17:21` (short versions accepted).
220-
- `--graalvm-java-version` allows to specify only a target Java version, such as `11` or `17` (note that only specific Java versions may be supported by the default GraalVM version that Scala CLI picks)
221-
- `--graalvm-version` allows to specify only a GraalVM version, such as `22.0.0` or `21` (short versions accepted)
220+
- `--graalvm-java-version` makes it possible to specify only a target Java version, such as `11` or `17` (note that only specific Java versions may be supported by the default GraalVM version that Scala CLI picks)
221+
- `--graalvm-version` makes it possible to specify only a GraalVM version, such as `22.0.0` or `21` (short versions accepted)
222222

223223
## Scala Native
224224

@@ -369,7 +369,7 @@ Instead of passing the `package` options directly from bash, it is possible to p
369369
370370
### packaging.packageType
371371
372-
This using directive allows to define the type of the package generated by the `package` command. For example:
372+
This using directive makes it possible to define the type of the package generated by the `package` command. For example:
373373
374374
```
375375
//> using packaging.packageType "assembly"
@@ -379,10 +379,10 @@ Available types: `assembly`, `raw-assembly`, `bootstrap`, `library`, `source`, `
379379
380380
### packaging.output
381381
382-
This using directive allows to define the destination path of the package generated by the `package` command. For example:
382+
This using directive makes it possible to define the destination path of the package generated by the `package` command. For example:
383383
384384
```
385385
//> using packaging.output "foo"
386386
```
387387
388-
This using directive allows to create a package named `foo` inside the current directory.
388+
The using directive above makes it possible to create a package named `foo` inside the current directory.

website/docs/commands/run.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ object Utils {
8181
}
8282
```
8383

84-
`scala-cli` takes into account and compiles `Utils.scala`.
84+
`scala-cli` takes it into account and compiles `Utils.scala`.
8585

8686
```bash
8787
scala-cli Main.scala
@@ -114,7 +114,7 @@ scala-cli run Hello.scala --watch
114114
```
115115
### Watch mode - restart
116116

117-
`--restart` mode runs your application in the background and automatically restart it upon any change:
117+
`--restart` mode runs your application in the background and automatically restarts it upon any change:
118118

119119
```bash ignore
120120
scala-cli run Hello.scala --restart

website/docs/commands/setup-ide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ But if you want to, invoke `setup-ide` like:
1414
scala-cli setup-ide . --scala 2.13
1515
```
1616

17-
Keep in mind that if you change any of those options, you may need to restart your IDE, or re-import your project.
17+
Keep in mind that if you change any of these options, you may need to restart your IDE, or re-import your project.
1818

1919
### IDE support internals
2020

2121
After invoking `setup-ide`, two files should be generated:
2222
- `.bsp/scala-cli.json`
23-
- `.scala/ide-options-v2.json`
23+
- `.scala-build/ide-options-v2.json`
2424

2525
The first file is specifically created for Build Server Protocol (BSP) support in your IDE.
2626
BSP is supported by VS Code (via the Metals extension) and IntelliJ (with the Scala plugin), and defines the way in which IDEs gather information about the project you are working on.

0 commit comments

Comments
 (0)