Skip to content

Commit 036379a

Browse files
authored
Merge pull request #207 from romanowski/more-gifs
Add more gifs
2 parents d22aa44 + a9fbbc7 commit 036379a

File tree

8 files changed

+47
-11
lines changed

8 files changed

+47
-11
lines changed

gifs/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ RUN cd /data
1313
RUN echo 'def a = 123' > a.scala
1414
RUN scala-cli compile a.scala || echo "Problems with bloop"
1515

16+
RUN apt-get install -y clang
17+
18+
RUN curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
19+
RUN apt-get install -y nodejs
20+
1621
RUN apt-get install -y rubygems
1722
RUN gem install rouge
1823

gifs/scenarios/complete-install.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,27 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
88

99
if [[ -z "${ASCIINEMA_REC}" ]]; then
1010
# Warm up scala-cli
11-
echo "println(1)" | scala-cli -
11+
apt-get purge -y scala-cli
1212
# or do other preparation (e.g. create code)
1313
else
1414
. $SCRIPT_DIR/../demo-magic.sh
1515
# # hide the evidence
1616
clear
1717

1818
# Put your stuff here
19-
pe "echo 'println(\"TODO: turn gifs/scenarios/complete-install.sh into proper scenario showing Complete installation\")' | scala-cli -"
19+
p scala-cli
20+
scala-cli
21+
p java
22+
java
23+
24+
sleep 2
25+
26+
pe "curl -sSLf https://virtuslab.github.io/scala-cli-packages/scala-setup.sh | sh"
27+
pe 'source ~/.profile'
28+
# pe "echo 'println(\"TODO: turn gifs/scenarios/complete-install.sh into proper scenario showing Complete installation\")' | scala-cli -"
29+
30+
pe "echo 'println(\"Hello from scala-cli\")' | scala-cli -"
31+
2032

2133
# Wait a bit to read output of last command
2234
sleep 2

gifs/scenarios/demo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ EOF
2929

3030
pe "scala-cli demo.scala -- Ala jake Mike"
3131

32-
sleep 2
32+
sleep 5
3333

3434
clear
3535

gifs/scenarios/universal_tool.sh

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,35 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
99
if [[ -z "${ASCIINEMA_REC}" ]]; then
1010
# Warm up scala-cli
1111
echo "println(1)" | scala-cli -
12+
echo "println(1)" | scala-cli --js - &&
13+
echo "println(1)" | scala-cli --native -S 2 -
14+
1215
# or do other preparation (e.g. create code)
1316
else
1417
. $SCRIPT_DIR/../demo-magic.sh
1518
# # hide the evidence
1619
clear
1720

18-
# Put your stuff here
19-
pe "echo 'println(\"TODO: turn gifs/scenarios/universal_tool.sh into proper scenario showing Universal tool" key="universal\")' | scala-cli -"
21+
cat <<EOF | updateFile js.scala
22+
@main def jsMain =
23+
import scala.scalajs.js.Dynamic.global
24+
println(s"Node js version: \${global.process.version}")
25+
EOF
26+
27+
pe "scala-cli --js js.scala"
28+
sleep 3
29+
clear
30+
31+
cat <<EOF | updateFile native.scala
32+
object Native extends App {
33+
import scala.scalanative.posix.limits
34+
println(s"Max path lenght in this OS is \${limits.PATH_MAX}")
35+
}
36+
EOF
37+
38+
pe "# Scala Native works only with Scala 2.x so far"
39+
pe "scala-cli --native -S 2 native.scala"
40+
sleep 3
2041

21-
# Wait a bit to read output of last command
22-
sleep 2
2342
echo " "
2443
fi

website/static/img/complete-install.svg

Lines changed: 1 addition & 1 deletion
Loading

website/static/img/dark/complete-install.svg

Lines changed: 1 addition & 1 deletion
Loading

website/static/img/dark/universal_tool.svg

Lines changed: 1 addition & 1 deletion
Loading

website/static/img/universal_tool.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)