Skip to content
Prev Previous commit
Next Next commit
Fix #78: Document fullOptJS fallback
  • Loading branch information
gzm0 authored and sjrd committed Aug 29, 2014
commit b3cdd51304377260b94bae6b6c7cb5b171fa3abb
6 changes: 6 additions & 0 deletions doc/sbt/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ Equivalent to the `fastOptStage` you can run your JavaScript code after the `ful

The same stage commands can be applied to the command `test` (have a look at the [bootstrapping skeleton](https://github.com/sjrd/scala-js-example-app) for a testing example).

Since 0.5.4, Scala.js directly passes ASTs to the Google Closure Compiler. In case this fails and you experience regression, you may fallback to the old behavior (write file, read file) by setting `directFullOptJS` to false:

{% highlight scala %}
ScalaJSKeys.directFullOptJS := false
{% endhighlight %}

## Writing Launcher Code

If you want the code which is used to run the main class to be written to a file, you can set `ScalaJSKeys.persistLauncher := true`. Note that this will require your main class to be either unique or explicitly set (`mainClass := Some(<name>)`). The resulting file in the target folder will have the suffix `-launcher.js`.