File tree Expand file tree Collapse file tree 8 files changed +47
-11
lines changed Expand file tree Collapse file tree 8 files changed +47
-11
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ RUN cd /data
13
13
RUN echo 'def a = 123' > a.scala
14
14
RUN scala-cli compile a.scala || echo "Problems with bloop"
15
15
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
+
16
21
RUN apt-get install -y rubygems
17
22
RUN gem install rouge
18
23
Original file line number Diff line number Diff line change @@ -8,15 +8,27 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
8
8
9
9
if [[ -z " ${ASCIINEMA_REC} " ]]; then
10
10
# Warm up scala-cli
11
- echo " println(1) " | scala-cli -
11
+ apt-get purge -y scala-cli
12
12
# or do other preparation (e.g. create code)
13
13
else
14
14
. $SCRIPT_DIR /../demo-magic.sh
15
15
# # hide the evidence
16
16
clear
17
17
18
18
# 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
+
20
32
21
33
# Wait a bit to read output of last command
22
34
sleep 2
Original file line number Diff line number Diff line change 29
29
30
30
pe " scala-cli demo.scala -- Ala jake Mike"
31
31
32
- sleep 2
32
+ sleep 5
33
33
34
34
clear
35
35
Original file line number Diff line number Diff line change @@ -9,16 +9,35 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
9
9
if [[ -z " ${ASCIINEMA_REC} " ]]; then
10
10
# Warm up scala-cli
11
11
echo " println(1)" | scala-cli -
12
+ echo " println(1)" | scala-cli --js - &&
13
+ echo " println(1)" | scala-cli --native -S 2 -
14
+
12
15
# or do other preparation (e.g. create code)
13
16
else
14
17
. $SCRIPT_DIR /../demo-magic.sh
15
18
# # hide the evidence
16
19
clear
17
20
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
20
41
21
- # Wait a bit to read output of last command
22
- sleep 2
23
42
echo " "
24
43
fi
You can’t perform that action at this time.
0 commit comments