Skip to content

Commit 3c81e1b

Browse files
authored
Merge pull request #440 from VirtusLab/stable
Back port of documentation changes to master
2 parents e452dd7 + 7feefc3 commit 3c81e1b

27 files changed

+6832
-7944
lines changed

.github/workflows/website.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
submodules: true
1515
- uses: actions/[email protected]
1616
with:
17-
node-version: '12.x'
17+
node-version: '16.x'
1818
- run: .github/scripts/update-website.sh
1919
env:
2020
GIT_USER: Virtuslab

gifs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Our animated svgs are compose of scenarios built using [demo-magic](https://gith
1212
2. Edit its content based on included tips.
1313
3. Run `generate_gifs.sh better-error` to to (re)render svgs based on `better-error.sh` scenario
1414

15-
Gifs will be saved in `website/static/img` and `website/static/img/dark` directories based on name of the scenario (so `foo.sh` becomes `foo.svg`)
15+
Gifs will be saved in `website/static/img/gifs` and `website/static/img/dark/gifs` directories based on name of the scenario (so `foo.sh` becomes `foo.svg`)

gifs/generate_gifs.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ do
6464
fileName=$(basename "$arg")
6565
name=${fileName%%.sh}
6666

67+
if ! [[ -f "$SCRIPT_DIR/scenarios/$name.sh" ]]; then
68+
echo "Scenario $SCRIPT_DIR/scenarios/$name.sh does not exist."
69+
exit 1
70+
fi
71+
6772
echo processing $name with $TTY_OPS
6873
svg_render_mappings="-v $SCRIPT_DIR/../website/static/img:/data -v $OUT/.scala:/out"
6974
svg_render_ops="--in /out/$name.cast --width $columns --height $rows --term iterm2 --padding 20"
@@ -90,7 +95,8 @@ do
9095
)
9196
fi
9297
if [ -z "$no_gifs" ]; then
93-
docker run --rm $svg_render_mappings asciinema/asciicast2gif -w $columns -h $rows -t monokai /out/$name.cast /data/gifs/$name.gif || (
98+
docker run --rm $svg_render_mappings asciinema/asciicast2gif -w $columns -h $rows -t monokai /out/$name.cast /data/gifs/$name.gif &&
99+
docker run --rm $svg_render_mappings asciinema/asciicast2gif -w $columns -h $rows -t solarized-dark /out/$name.cast /data/dark/gifs/$name.gif || (
94100
echo "Scenario failed: $name" &&
95101
echo $name >> $OUT/failures.txt &&
96102
failure=true

website/docs/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ Scala-CLI documentation is split into three main sections:
3737

3838
**Happy hacking with Scala CLI!**
3939

40-
![Demo](/img/dark/demo.svg)
40+
![Demo](/img/dark/demo.gif)
4141

website/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "2.0.0-beta.8",
18-
"@docusaurus/preset-classic": "2.0.0-beta.8",
19-
"@mdx-js/react": "^1.6.21",
17+
"@docusaurus/core": "2.0.0-beta.9",
18+
"@docusaurus/preset-classic": "2.0.0-beta.9",
19+
"@mdx-js/react": "^1.6.22",
2020
"clsx": "^1.1.1",
2121
"docusaurus-plugin-sass": "^0.2.1",
22-
"react": "^17.0.1",
23-
"react-dom": "^17.0.1",
22+
"react": "^17.0.2",
23+
"react-dom": "^17.0.2",
2424
"react-player": "^2.9.0",
2525
"sass": "^1.42.1"
2626
},

website/src/components/features.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import ImageBox from '../components/ImageBox';
44

55
const featuresList = [
6-
<ImageBox image="versions.svg" title="Scala versions, dependencies and JVMs"
6+
<ImageBox image="gifs/versions.gif" title="Scala versions, dependencies and JVMs"
77
key="versions" projects="true">
88
<p>
99
Scala CLI is built on top of coursier
@@ -20,7 +20,7 @@ const featuresList = [
2020
<i>Some additional setup may be required for <a href="/install#scala-js">JS</a> and <a href="/install#scala-native">Native</a></i>
2121
</p>
2222
</ImageBox>,
23-
<ImageBox image="universal_tool.svg" title="Universal tool" key="universal"
23+
<ImageBox image="gifs/universal_tool.gif" title="Universal tool" key="universal"
2424
projects="true">
2525
<p>
2626
If you want to use older <b>version of Scala</b> or
@@ -43,7 +43,7 @@ const featuresList = [
4343
</p>
4444
</ImageBox>,
4545
<ImageBox
46-
image="complete-install.svg" title="Complete installation"
46+
image="gifs/complete-install.gif" title="Complete installation"
4747
key="complete-install" education="true">
4848
<p>
4949
Scala CLI comes with batteries included. No additional installation is required, no more fluffing with setting up the correct Java version or <code>PATH</code>
@@ -53,7 +53,7 @@ const featuresList = [
5353
</p>
5454
</ImageBox>,
5555
<ImageBox
56-
image="defaults.svg" title="Solid defaults"
56+
image="gifs/defaults.gif" title="Solid defaults"
5757
key="defaults" education="true">
5858
<p>
5959
No additional configuration is needed to most Scala CLI commands.
@@ -63,7 +63,7 @@ const featuresList = [
6363
</p>
6464
</ImageBox>,
6565
<ImageBox
66-
image="learning_curve.svg" title="No learning curve"
66+
image="gifs/learning_curve.gif" title="No learning curve"
6767
key="curve" education="true">
6868
<p>
6969
Scala CLI does not use complex configuration language, its options are simple and self-explanatory
@@ -73,13 +73,13 @@ const featuresList = [
7373
</p>
7474
</ImageBox>,
7575
<ImageBox
76-
image="powerful_scripts.svg" title="Scripts are as powerful as other programs" key="scripts-as-apps" scripting="true">
76+
image="gifs/powerful_scripts.gif" title="Scripts are as powerful as other programs" key="scripts-as-apps" scripting="true">
7777
<p>
7878
Scripts in Scala CLI can use dependencies and other features as standard Scala programs. Scala CLI is command-line first giving access to all its features without need for any configuration file or specific project structure.
7979
</p>
8080
</ImageBox>,
8181
<ImageBox
82-
image="embeddable_scripts.svg" title="Embeddable Scripts" key="embed-scripts" scripting="true">
82+
image="gifs/embeddable_scripts.gif" title="Embeddable Scripts" key="embed-scripts" scripting="true">
8383
<p>
8484
Scala CLI can be set up in shebang lines, making your *.scala or *.sc files runnable
8585
</p>
@@ -100,7 +100,7 @@ const featuresList = [
100100
// Prototyping
101101

102102
<ImageBox
103-
image="self-contained-examples.svg" title="Self-contained examples"
103+
image="gifs/self-contained-examples.gif" title="Self-contained examples"
104104
key="self-contained-examples" prototyping="true">
105105
<p>
106106
With Scala CLI, configuration can be included in source code so complex examples can be self-contained and shipped as e.g. gist. Moreover, Scala CLI can compile, run and test gists without any manual work!

website/src/pages/education.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Index = (props) => {
77
title="Education with Scala CLI"
88
description="Page describing why Scala CLI is good within educational purposes, mainly learning Scala."
99
headline="Learn a language not a build tool"
10-
image="education.svg"
10+
image="gifs/education.gif"
1111
id="education"
1212
>
1313
<p>Scala-cli is deigned in a way so you can focus on learning, not struggle with installation or build tool.</p>

website/src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const Index = (props) => {
2222
<div className="container content">
2323

2424
{/* Headline */}
25-
<YellowBanner title="Scala CLI is a command-line tool to interact with the Scala language." image="demo.svg">
25+
<YellowBanner title="Scala CLI is a command-line tool to interact with the Scala language." image="gifs/demo.gif">
2626
<p>
2727
It lets you compile, run, test, and package your Scala code (and more!)
2828
</p>

website/src/pages/projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Index = (props) => {
77
title="Single-module projects with Scala CLI"
88
description="Page describing why Scala CLI is good for maintainig a single-module projects."
99
headline="Fight with your bugs not with with you buildtool"
10-
image="projects.svg"
10+
image="gifs/projects.gif"
1111
id="projects"
1212
>
1313
<p>Scala CLI provides all tools to maintain with easy single module projects like cli apps or single microservice.</p>

website/src/pages/prototyping.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Index = (props) => {
77
title="Prototyping, experimenting, reproducing bugs with Scala CLI"
88
description="Page describing why Scala CLI is good for prototyping / experimenting / reproducing bugs."
99
headline="Move fast and break things but be in control of your build"
10-
image="prototyping.svg"
10+
image="gifs/prototyping.gif"
1111
id="prototyping"
1212
>
1313
<p>If you ever waste time prototyping, experimenting or reproducing a nasty bug by testing different environment then you intendted?</p>

0 commit comments

Comments
 (0)