Skip to content

Commit

Permalink
Merge pull request #2593 from VirtusLab/stable
Browse files Browse the repository at this point in the history
Back port of documentation changes to main
  • Loading branch information
tgodzik authored Nov 29, 2023
2 parents 3897be5 + 88b3d87 commit d28977a
Show file tree
Hide file tree
Showing 10 changed files with 4,867 additions and 5,431 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ jobs:
jvm: "zulu:17"
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: 18
- name: Build documentation
run: .github/scripts/build-website.sh
- name: Test documentation
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: 18
- run: .github/scripts/update-website.sh
env:
GIT_USER: Virtuslab
Expand Down
6 changes: 3 additions & 3 deletions website/docs/commands/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: Basics
sidebar_position: 3
---

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


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

Expand Down Expand Up @@ -174,7 +174,7 @@ Make sure that you trust the code that you are about to run.
Scala CLI accepts input via URLs pointing at `.scala` files.
It downloads their content, and runs them:

<ChainedSnippet>
<ChainedSnippets>

```bash
scala-cli https://gist.github.com/alexarchambault/f972d941bc4a502d70267cfbbc4d6343/raw/2691c01984c9249936a625a42e29a822a357b0f6/Test.scala
Expand All @@ -184,7 +184,7 @@ scala-cli https://gist.github.com/alexarchambault/f972d941bc4a502d70267cfbbc4d63
Hello from Scala GitHub Gist
```

</ChainedSnippet>
</ChainedSnippets>

### GitHub Gist

Expand Down
4 changes: 2 additions & 2 deletions website/docs/commands/publishing/publish-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ scala-cli --power config publish.user.email "[email protected]"
scala-cli --power config publish.user.url "https://alex.me"
```

<!-- clear -->
\<!-- clear -->

The email can be left empty if you'd rather not put your email in POM files:
```bash
Expand Down Expand Up @@ -151,7 +151,7 @@ scala-cli config github.token "command:xclip -selection clipboard -o" --password
`publish setup` infers some publishing parameters from the GitHub URL of your project.
It also uploads repository secrets there, when setting up publishing on GitHub actions.

To create a new repository from a project, head to <https://repo.new>, pick a name
To create a new repository from a project, head to `https://repo.new`, pick a name
for your project and create the repository. Note its URL, and do
```bash ignore
scala-cli default-file .gitignore --write # if you don't have a .gitignore already
Expand Down
2 changes: 1 addition & 1 deletion website/docs/cookbooks/emacs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 14
---

Emacs users can make it easier to use Scala CLI from within their editor by
loading an extension: <https://github.com/ag91/scala-cli-repl>.
loading an extension: [https://github.com/ag91/scala-cli-repl](https://github.com/ag91/scala-cli-repl).

That lets you send Scala code directly from your buffer to the Scala REPL.

Expand Down
1 change: 1 addition & 0 deletions website/docs/guides/shebang.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Shebang
sidebar_position: 31
---
import {ChainedSnippets} from "../../src/components/MarkdownComponents.js";


This guide explains the differences between the `run` and `shebang` sub-commands, mainly covering how each of them
Expand Down
7 changes: 4 additions & 3 deletions website/docs/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Release notes
sidebar_position: 99
---
import {ChainedSnippets} from "../src/components/MarkdownComponents.js";
import ReactPlayer from 'react-player'


Expand All @@ -27,7 +28,7 @@ scala-cli -e 'println(System.getProperty("java.version"))'
# might give more details.
```

This is because we no longer support JVM <17 with Scala CLI v1.0.5, but we still have been defaulting to whatever JVM
This is because we no longer support JVM \<17 with Scala CLI v1.0.5, but we still have been defaulting to whatever JVM
was defined in `JAVA_HOME`. As a result, Bloop has been failing to start when running with, say, `JAVA_HOME` pointing
to Java 8.

Expand Down Expand Up @@ -2159,7 +2160,7 @@ Added in [#1347](https://github.com/VirtusLab/scala-cli/pull/1347) by [@wleczny]
#### Fixes

* Ensure directories are created recursively when the `package` sub-command is called by [@Gedochao](https://github.com/Gedochao) in [#1371](https://github.com/VirtusLab/scala-cli/pull/1371)
* Fix calculation of Scala version and turn off the `-release` flag for 2.12.x < 2.12.5 by [@Gedochao](https://github.com/Gedochao) in [#1377](https://github.com/VirtusLab/scala-cli/pull/1377)
* Fix calculation of Scala version and turn off the `-release` flag for 2.12.x \< 2.12.5 by [@Gedochao](https://github.com/Gedochao) in [#1377](https://github.com/VirtusLab/scala-cli/pull/1377)
* Fix finding main classes in external jars by [@Gedochao](https://github.com/Gedochao) in [#1380](https://github.com/VirtusLab/scala-cli/pull/1380)
* Fix Js split style SmallModulesFor in pure JVM by [@lwronski](https://github.com/lwronski) in [#1394](https://github.com/VirtusLab/scala-cli/pull/1394)

Expand Down Expand Up @@ -2187,7 +2188,7 @@ Added in [#1347](https://github.com/VirtusLab/scala-cli/pull/1347) by [@wleczny]

## [v0.1.14](https://github.com/VirtusLab/scala-cli/releases/tag/v0.1.14)

### Hotfix printing stacktraces from Scala CLI runner for Scala 3.x < 3.2.0
### Hotfix printing stacktraces from Scala CLI runner for Scala 3.x \< 3.2.0
We fixed a nasty bug breaking any Scala CLI run using any Scala 3 version earlier than 3.2.0 on printing stacktraces.
Only Scala CLI 0.1.13 was affected.
```
Expand Down
11 changes: 3 additions & 8 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('@docusaurus/types').DocusaurusConfig} */

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const lightCodeTheme = require('prism-react-renderer').themes.github;
const darkCodeTheme = require('prism-react-renderer').themes.dracula;

module.exports = {
title: 'Scala CLI',
Expand All @@ -13,14 +13,9 @@ module.exports = {
favicon: 'img/favicon.ico',
organizationName: 'Virtuslab',
projectName: 'scala-cli',
plugins: ['docusaurus-plugin-sass'],
plugins: ['docusaurus-plugin-sass', "@easyops-cn/docusaurus-search-local"],
themeConfig: {
image: "img/logo.png",
algolia: {
apiKey: '254542739498a46e1392862504c0b4a1',
indexName: 'scala-cli',
appId: 'BH4D9OD16A',
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
Expand Down
9 changes: 5 additions & 4 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/preset-classic": "2.3.1",
"@mdx-js/react": "^1.6.22",
"@docusaurus/core": "3.0.0",
"@docusaurus/preset-classic": "3.0.0",
"@easyops-cn/docusaurus-search-local": "^0.38.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.2.1",
"docusaurus-plugin-sass": "^0.2.3",
"docusaurus-plugin-sass": "^0.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-player": "^2.11.2",
Expand Down
Loading

0 comments on commit d28977a

Please sign in to comment.