Skip to content

Commit 38268dc

Browse files
committed
Add HTML runners for the helloworld and reversi with 2.12.
1 parent 58f56ad commit 38268dc

File tree

4 files changed

+94
-0
lines changed

4 files changed

+94
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Hello world - Scala.js example</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6+
</head>
7+
<body>
8+
9+
<div id="playground">
10+
</div>
11+
12+
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
13+
14+
<script type="text/javascript" src="./target/scala-2.12/helloworld-fastopt.js"></script>
15+
16+
</body>
17+
</html>
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Hello world - Scala.js example</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6+
</head>
7+
<body>
8+
9+
<div id="playground">
10+
</div>
11+
12+
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
13+
14+
<script type="text/javascript" src="./target/scala-2.12/helloworld-opt.js"></script>
15+
16+
</body>
17+
</html>
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Reversi - Scala.js example</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6+
</head>
7+
<body>
8+
9+
<h1>Reversi - Scala.js example</h1>
10+
11+
<p>Somewhat inspired by
12+
<a href="http://davidbau.com/reversi/">http://davidbau.com/reversi/</a></p>
13+
14+
<div id="playground">
15+
</div>
16+
17+
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
18+
19+
<script type="text/javascript" src="./target/scala-2.12/reversi-fastopt.js"></script>
20+
21+
<script type="text/javascript">
22+
$(function() {
23+
var mainInstance = new Reversi(
24+
jQuery, jQuery("#playground"));
25+
mainInstance.startGame();
26+
});
27+
</script>
28+
29+
</body>
30+
</html>

examples/reversi/reversi-2.12.html

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Reversi - Scala.js example</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6+
</head>
7+
<body>
8+
9+
<h1>Reversi - Scala.js example</h1>
10+
11+
<p>Somewhat inspired by
12+
<a href="http://davidbau.com/reversi/">http://davidbau.com/reversi/</a></p>
13+
14+
<div id="playground">
15+
</div>
16+
17+
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
18+
19+
<script type="text/javascript" src="./target/scala-2.12/reversi-opt.js"></script>
20+
21+
<script type="text/javascript">
22+
$(function() {
23+
var mainInstance = new Reversi(
24+
jQuery, jQuery("#playground"));
25+
mainInstance.startGame();
26+
});
27+
</script>
28+
29+
</body>
30+
</html>

0 commit comments

Comments
 (0)