This repository has been archived by the owner on Mar 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to Scala.js 0.5.0 and Scala 2.11.1.
- Loading branch information
Showing
10 changed files
with
27 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
language: scala | ||
script: | ||
- sbt ++$TRAVIS_SCALA_VERSION test optimizeJS | ||
- sbt ++$TRAVIS_SCALA_VERSION test packageJS fullOptJS | ||
scala: | ||
- 2.10.4 | ||
- 2.11.0 | ||
- 2.11.1 | ||
jdk: | ||
- oraclejdk7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
# Example application written in Scala.js | ||
|
||
This is a barebone example of an application written in | ||
[Scala.js](https://github.com/lampepfl/scala-js). | ||
[Scala.js](https://www.scala-js.org/). | ||
|
||
## Get started | ||
|
||
To get started, open `sbt` in this example project, and issue the task | ||
`packageJS`. This creates the file `target/scala-2.10/example.js` and its | ||
siblings `example-extdeps.js` and `example-intdeps.js`. | ||
You can now open `index-dev.html` in your favorite Web browser! | ||
To get started, open `sbt` in this example project, and execute the task | ||
`fastOptJS`. This creates the file `target/scala-2.11/example-fastopt.js`. | ||
You can now open `index-fastopt.html` in your favorite Web browser! | ||
|
||
During development, it is useful to use `~packageJS` in sbt, so that each | ||
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. | ||
|
||
## The preoptimized version | ||
## Run the tests | ||
|
||
Instead of running `packageJS`, you can also run `preoptimizeJS` to generate | ||
a much more compact version of the JavaScript code in virtually no more time | ||
than you run `packageJS`. In that case, open the `example-preopt.html` file | ||
to execute the application. Note that browser refresh is much faster in this | ||
case. | ||
To run the test suite, execute the task `test`. If you have installed | ||
[Node.js](http://nodejs.org/), you can also run `fastOptStage::test` which is | ||
faster. | ||
|
||
`preoptimizeJS` should be fast enough for you to use `~preoptimizeJS` in sbt | ||
for your development cycle. | ||
## The fully optimized version | ||
|
||
## The optimized version | ||
|
||
For ultimate code size reduction, use `optimizeJS`. This will take several | ||
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-dev.html` (resp. `index-preopt.html`) | ||
refers to the JavaScript emitted by `packageJS` (resp. `preoptimizeJS`), | ||
`index.html` refers to the optimized JavaScript emitted by `optimizeJS`. | ||
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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
addSbtPlugin("org.scala-lang.modules.scalajs" % "scalajs-sbt-plugin" % "0.4.4") | ||
addSbtPlugin("org.scala-lang.modules.scalajs" % "scalajs-sbt-plugin" % "0.5.0") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters