• This repository has been archived on 31/Mar/2018
  • Stars
    star
    166
  • Rank 227,748 (Top 5 %)
  • Language
    Scala
  • Created over 11 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example application built with Scala.js

Barebone application written in Scala.js -- not maintained

This repository is not maintained anymore. Consider the scala-js-tutorial repository instead, along with the actual tutorial.

This is a barebone example of an application written in Scala.js.

Get started

To get started, open sbt in this example project, and execute the task fastOptJS. This creates the file target/scala-2.12/example-fastopt.js. You can now open index-fastopt.html in your favorite Web browser!

During development, it is useful to use ~fastOptJS in sbt, so that each time you save a source file, a compilation of the project is triggered. Hence only a refresh of your Web page is needed to see the effects of your changes.

Run the tests

To run the test suite, execute the task test. If you have installed Node.js, you can use that runtime to run the tests, which is faster:

> set scalaJSStage in Global := FastOptStage
> test

The fully optimized version

For ultimate code size reduction, use fullOptJS. This will take several seconds to execute, so typically you only use this for the final, production version of your application. While index-fastopt.html refers to the JavaScript emitted by fastOptJS, index.html refers to the optimized JavaScript emitted by fullOptJS.

If Node.js is installed, the tests can also be run in their fully optimized version with:

> set scalaJSStage in Global := FullOptStage
> test

More Repositories

1

scala-js-ts-importer

TypeScript Importer for Scala.js
Scala
231
star
2

scala-js-actors

Actor system for Scala.js
Scala
100
star
3

scala-js-jquery

jQuery facade types for Scala.js
Scala
83
star
4

ozma

Extending Scala with Oz Concurrency
Scala
82
star
5

scalajs-sbt-vite-laminar-chartjs-example

An example of using Scala.js with sbt, Vite, Laminar and Chart.js
Scala
82
star
6

scala-unboxed-option

A type-parametric unboxed Option type for Scala
Scala
59
star
7

scala-js-pickling

Pickling for Scala.js
Scala
40
star
8

sbt-dynscalajs

Dynamically switch between the JVM target and versions of Scala.js in a Scala project
Scala
24
star
9

scalatscomp

A TypeScript compiler written in Scala (wip)
Scala
15
star
10

sepi

Object-oriented scripting engine for Delphi
Pascal
12
star
11

scalajs-reflect

Proof of concept of a "linker plugin" enabling some reflection for Scala.js
Scala
11
star
12

scalajs-phaser-demo

Small demo of a game written in Scala.js with the Phaser library
JavaScript
10
star
13

scala-javalib

Partial implementation of the Java standard library in Scala
Scala
8
star
14

scalajsir-calc

A toy project to play with the Scala.js IR
Scala
8
star
15

funlabyrinthe-scala

A reimplementation of FunLabyrinthe in Scala
Scala
7
star
16

funlabyrinthe

A fun maze game with tremendous customization features
Pascal
5
star
17

gwt-sha512-benchmark

SHA-512 benchmark for GWT
Java
2
star
18

kotlin-long-bench

Kotlin
2
star
19

scala-js-teavm-examples

Port of the Scala examples of TeaVM to Scala.js
Scala
2
star
20

mozart2-libmozart-experiment

Template for experimenting with the Mozart2 VM library
C++
2
star
21

funlaby-extensions

Extensions for FunLabyrinthe
Pascal
2
star
22

funlaby-library

Official library of FunLabyrinthe
Pascal
2
star
23

mozart-app-test

Test application using the new Mozart VM
2
star
24

try_git

1
star
25

scala-js-long-benchmark

JavaScript
1
star
26

teavm-long-bench

SHA-512 benchmark for TeaVM
Java
1
star
27

capture-the-flag

Simulation of the game Capture the Flag: Ozma example
Scala
1
star