To generate a single JavaScript file using sbt, just use the fastOptJS
task:
> fastOptJS
If you want to change selection, open document below and click on "Move attachment"
Basic tutorial - Scala.jspplication, we would like to use it in an HTML page. To do this, we need two steps:
Generate a single JavaScript file out of our compiled code Create an HTML page which includes that file and calls the application
Generate JavaScript
<span>To generate a single JavaScript file using sbt, just use the fastOptJS task:
> fastOptJS
[info] Fast optimizing (...)/scala-js-tutorial/target/scala-2.11/scala-js-tutorial-fastopt.js
[success] (...)
This will perform some fast optimizations and generate the target/sc Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details