8000 Fix typos in docs by alexarchambault · Pull Request #873 · VirtusLab/scala-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix typos in docs #873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gifs/scenarios/education.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else
cat <<EOF | updateFile HelloWorld.scala
object HelloWorld {
def main(args: Array[String]) = {
println("Hello world from ScalaCLI")
println("Hello world from Scala CLI")
}
}
EOF
Expand All @@ -30,7 +30,7 @@ EOF

# Wait a bit to read output of last command
doSleep 5
clearConsole
clearConsole
cat <<EOF | updateFile HelloWorld.sc
println("Hello world from script")
EOF
Expand Down
6 changes: 3 additions & 3 deletions gifs/scenarios/learning_curve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ else
cat <<EOF | updateFile Hello.scala
// using scala 3.0.2

@main def hello() = println("Hello world from ScalaCLI")
@main def hello() = println("Hello world from Scala CLI")
EOF

pe "scala-cli Hello.scala"

# Wait a bit to read output of last command
doSleep 2
clearConsole
clearConsole

cat <<EOF | updateFile Hello.scala
// using scala 2.13.6

object Hello extends App {
println("Hello world from ScalaCLI")
println("Hello world from Scala CLI")
}
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import com.github.plokhotnyuk.jsoniter_scala.macros._
final case class ScalaJsOptions(

@Group("Scala")
@HelpMessage("Enable Scala.js. To show more options for Scala.Js pass `--help-js`")
@HelpMessage("Enable Scala.js. To show more options for Scala.js pass `--help-js`")
js: Boolean = false,

@Group("Scala.js")
@HelpMessage("The Scala JS version")
@HelpMessage("The Scala.js version")
jsVersion: Option[String] = None,
@Group("Scala.js")
@HelpMessage("The Scala JS mode, either `dev` or `release`")
@HelpMessage("The Scala.js mode, either `dev` or `release`")
jsMode: Option[String] = None,
@HelpMessage("The Scala JS module kind: commonjs/common, esmodule/es, nomodule/none")
@HelpMessage("The Scala.js module kind: commonjs/common, esmodule/es, nomodule/none")
@Group("Scala.js")
jsModuleKind: Option[String] = None,

Expand Down Expand Up @@ -46,10 +46,10 @@ final case class ScalaJsOptions(
@HelpMessage("Avoid lets and consts when using vars has the same observable semantics.")
jsAvoidLetsAndConsts: Option[Boolean] = None,
@Group("Scala.js")
@HelpMessage("The Scala JS module split style: fewestmodules, smallestmodules")
@HelpMessage("The Scala.js module split style: fewestmodules, smallestmodules")
jsModuleSplitStyle: Option[String] = None,
@Group("Scala.js")
@HelpMessage("The Scala JS ECMA Script version: es5_1, es2015, es2016, es2017, es2018, es2019, es2020, es2021")
@HelpMessage("The Scala.js ECMA Script version: es5_1, es2015, es2016, es2017, es2018, es2019, es2020, es2021")
jsEsVersion: Option[String] = None,

@Group("Scala.js")
Expand Down
10 changes: 5 additions & 5 deletions modules/cli/src/main/scala/scala/cli/commands/Update.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object Update extends ScalaCommand[UpdateOptions] {
val scalaCliVersionRegex = "tag/v(.*?)\"".r
scalaCliVersionRegex.findFirstMatchIn(resp).map(_.group(1))
}.getOrElse(
sys.error("Can not resolve ScalaCLI version to update")
sys.error("Can not resolve Scala CLI version to update")
)

def installDirPath(options: UpdateOptions): os.Path =
Expand Down Expand Up @@ -78,11 +78,11 @@ object Update extends ScalaCommand[UpdateOptions] {
if (!options.isInternalRun)
if (isOutdated)
updateScalaCli(options, newestScalaCliVersion)
else println("ScalaCLI is up-to-date")
else println("Scala CLI is up-to-date")
else if (isOutdated)
println(
s"""Your ScalaCLI $currentVersion is outdated, please update ScalaCLI to $newestScalaCliVersion
|Run 'curl -sSLf https://virtuslab.github.io/scala-cli-packages/scala-setup.sh | sh' to update ScalaCLI.""".stripMargin
s"""Your Scala CLI $currentVersion is outdated, please update Scala CLI to $newestScalaCliVersion
|Run 'curl -sSLf https://virtuslab.github.io/scala-cli-packages/scala-setup.sh | sh' to update Scala CLI.""".stripMargin
)
}

Expand All @@ -109,7 +109,7 @@ object Update extends ScalaCommand[UpdateOptions] {
}
else if (Properties.isWin) {
if (!options.isInternalRun) {
System.err.println("ScalaCLI update is not supported on Windows.")
System.err.println("Scala CLI update is not supported on Windows.")
sys.exit(1)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object Version extends ScalaCommand[VersionOptions] {

scalaCliVersionRegex.findFirstMatchIn(resp).map(_.group(1))
}.getOrElse(
sys.error("Can not resolve ScalaCLI version to update")
sys.error("Can not resolve Scala CLI version to update")
)

def isOutdated(maybeScalaCliBinPath: Option[os.Path]): Boolean =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import scala.build.{Logger, Positioned}

case object UsingScalaJsOptionsDirectiveHandler extends UsingDirectiveHandler {

def name: String = "Scala JS options"
def name: String = "Scala.js options"

def description: String = "Add Scala JS options"
def description: String = "Add Scala.js options"

def usage: String = s"//> using ${keys.mkString("|")} _value_"

Expand Down
8 changes: 4 additions & 4 deletions website/docs/_advanced_install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ Script to automatically download and cache standalone `scala-cli` launcher.
]}>
<TabItem value="macOS/Linux">

<DownloadButton desc= 'ScalaCLI launcher for macOs/Linux' href='https://github.com/VirtusLab/scala-cli/blob/main/scala-cli.sh' width = '250px' ></DownloadButton>
<DownloadButton desc= 'Scala CLI launcher for macOS/Linux' href='https://github.com/VirtusLab/scala-cli/blob/main/scala-cli.sh' width = '250px' ></DownloadButton>

</TabItem>
<TabItem value="windows">

<DownloadButton desc= 'ScalaCLI launcher for Windows' href='https://github.com/VirtusLab/scala-cli/blob/main/scala-cli.bat' width = '250px' ></DownloadButton>
<DownloadButton desc= 'Scala CLI launcher for Windows' href='https://github.com/VirtusLab/scala-cli/blob/main/scala-cli.bat' width = '250px' ></DownloadButton>

</TabItem>
</Tabs>
Expand Down Expand Up @@ -403,10 +403,10 @@ scala-cli install completions --shell zsh
</div></div>

<div id="scala-js"/>
<SectionAbout title="Scala JS"/>
<SectionAbout title="Scala.js"/>
<div className="row"><div className="col col--9 col--offset-1 padding--lg advanced_install_methods">

To run Scala JS applications [Node.js](https://nodejs.org/) needs to be installed. Scala CLI at this moment does not manage Node.js however it may change in the future.
To run Scala.js applications [Node.js](https://nodejs.org/) needs to be installed. Scala CLI at this moment does not manage Node.js however it may change in the future.

</div></div>

Expand Down
12 changes: 6 additions & 6 deletions website/docs/commands/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ scala-cli package Hello.scala -o hello
# Hello
```

<!-- Expected
<!-- Expected
Hello
-->

Expand Down Expand Up @@ -132,8 +132,8 @@ docker run hello-docker
Hello from Docker
-->

You can also create Docker images for the Scala JS and Scala Native environments.
This command shows how to create a Docker image (`--docker`) for a Scala JS (`--js`) application:
You can also create Docker images for the Scala.js and Scala Native environments.
This command shows how to create a Docker image (`--docker`) for a Scala.js (`--js`) application:

```bash
scala-cli package --js --docker HelloDocker.scala --docker-image-repository hello-docker
Expand All @@ -155,7 +155,7 @@ scala-cli package --native --docker HelloDocker.scala --docker-image-repository

`--docker-from` lets you specify your base docker image.

The following command generate a `hello-docker` image using base image `openjdk:11`
The following command generate a `hello-docker` image using base image `openjdk:11`

```bash ignore
scala-cli package --docker HelloDocker.scala --docker-from openjdk:11 --docker-image-repository hello-docker
Expand Down Expand Up @@ -321,8 +321,8 @@ scala-cli package --rpm --output 'path.rpm' Hello.scala

### macOS (PKG)

PKG is the software package format for macOs.
To build a PKG you will need to have [`pkgbuild`](https://www.unix.com/man-page/osx/1/pkgbuild/) installed.
PKG is the software package format for macOS.
To build a PKG you will need to have [`pkgbuild`](https://www.unix.com/man-page/osx/1/pkgbuild/) installed.

Example:

Expand Down
2 changes: 1 addition & 1 deletion website/docs/cookbooks/scala-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Picking the Scala version with scala-cli
sidebar_position: 2
---

By default, `scala-cli` runs the latest supported scala version by ScalaCLI. See our list of [Supported Scala Versions](../reference/scala-versions) in ScalaCLI.
By default, `scala-cli` runs the latest supported scala version by Scala CLI. See our list of [Supported Scala Versions](../reference/scala-versions) in Scala CLI.

To demonstrate how this works, here’s a universal piece of code that detects the Scala version at runtime.
The code is a bit complicated, so we suggest that you skip reading the whole file, and just focus on what it prints:
Expand Down
8 changes: 4 additions & 4 deletions website/docs/cookbooks/vscode.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Setup ScalaCLI project in VSCode
title: Setup Scala CLI project in VSCode
sidebar_position: 7
---

Scala CLI can generate the files that are necessary for providing IDE support in Visual Studio Code.

For example, here is a simple project in scala-cli which contains only one main and test class.
For example, here is a simple project in scala-cli which contains only one main and test class.

```scala title=HelloWorld.scala
@main
@main
def hello() = println("Hello, world")
```

Expand Down Expand Up @@ -36,7 +36,7 @@ scala-cli run .
# "Hello, world"
```

and then, we launch Visual Studio Code
and then, we launch Visual Studio Code

```bash ignore
code .
Expand Down
28 changes: 14 additions & 14 deletions website/docs/guides/scala-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Hello World from Scala.js

### Module Split Style - Smallest Modules

Passing `--js-module-split-style smallestmodules` to the `package` sub-command creates js modules that are as small as possible.
Passing `--js-module-split-style smallestmodules` to the `package` sub-command creates js modules that are as small as possible.
Scala.js linker generates a lot of js modules, which are copied to the `output` directory.

```scala title=SmallestModules.scala
Expand All @@ -68,7 +68,7 @@ object Hello extends App {
```

```bash
scala-cli package --js SmallestModules.scala --js-module-split-style smallestmodules --js-module-kind es --output hello
scala-cli package --js SmallestModules.scala --js-module-split-style smallestmodules --js-module-kind es --output hello
echo "{\"type\": \"module\"}" >> package.json # enable ES module
node hello/main.js
# Hello World from Scala.js
Expand Down Expand Up @@ -124,13 +124,13 @@ object Hello {
scala-cli Hello.scala --js-dom
```

## Using Directives
## Using Directives

Scala.Js options are supported by using directives in ScalaCLI:
Scala.js options are supported by using directives in Scala CLI:

#### `--js-version`

The Scala JS version
The Scala.js version

#### `--js-header`

Expand All @@ -140,14 +140,14 @@ For more options, see our [`using` directive section](./reference/directives.md#

## Supported Scala.js Versions

In the future, the ScalaCLI will be able to support any version of Scala.js independently of the version of scala-cli. But for now, there are some limitations and it isn't possible to use each version of Scala.js.
In the future, the Scala CLI will be able to support any version of Scala.js independently of the version of scala-cli. But for now, there are some limitations and it isn't possible to use each version of Scala.js.

The table below lists the last supported version of Scala.js in ScalaCLI. If you want to use newer Scala.js, update scala-cli.
The table below lists the last supported version of Scala.js in Scala CLI. If you want to use newer Scala.js, update scala-cli.

| ScalaCLI versions | ScalaJs |
|---------------------|:-----------------:|
| 0.0.9 | 1.7.1 |
| 0.1.0 | 1.8.0 |
| 0.1.1 | 1.8.0 |
| 0.1.2 | 1.8.0 |
| 0.1.3 | 1.9.0 |
| Scala CLI versions | Scala.js |
|----------------------|:------------------:|
| 0.0.9 | 1.7.1 |
| 0.1.0 | 1.8.0 |
| 0.1.1 | 1.8.0 |
| 0.1.2 | 1.8.0 |
| 0.1.3 | 1.9.0 |
12 changes: 6 additions & 6 deletions website/docs/reference/cli-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -1045,19 +1045,19 @@ Available in commands:

#### `--js`

Enable Scala.js. To show more options for Scala.Js pass `--help-js`
Enable Scala.js. To show more options for Scala.js pass `--help-js`

#### `--js-version`

The Scala JS version
The Scala.js version

#### `--js-mode`

The Scala JS mode, either `dev` or `release`
The Scala.js mode, either `dev` or `release`

#### `--js-module-kind`

The Scala JS module kind: commonjs/common, esmodule/es, nomodule/none
The Scala.js module kind: commonjs/common, esmodule/es, nomodule/none

#### `--js-check-ir`

Expand Down Expand Up @@ -1091,11 +1091,11 @@ Avoid lets and consts when using vars has the same observable semantics.

#### `--js-module-split-style`

The Scala JS module split style: fewestmodules, smallestmodules
The Scala.js module split style: fewestmodules, smallestmodules

#### `--js-es-version`

The Scala JS ECMA Script version: es5_1, es2015, es2016, es2017, es2018, es2019, es2020, es2021
The Scala.js ECMA Script version: es5_1, es2015, es2016, es2017, es2018, es2019, es2020, es2021

#### `--js-linker-path`

Expand Down
Loading
0