From 76edb60d1b32411a986736fd9c5457f5539d9aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 17 Mar 2023 14:42:22 +0100 Subject: [PATCH] Fix #599: Expand a bit the sbt setup on the doc/project/ page. --- doc/project/index.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/project/index.md b/doc/project/index.md index dddcf221..310bfd16 100644 --- a/doc/project/index.md +++ b/doc/project/index.md @@ -4,7 +4,7 @@ title: Scala.js project structure --- -Scala.js comes with an sbt plugin that facilitates compiling, running and testing with Scala.js. For a quick start, +Scala.js comes with an sbt plugin that facilitates compiling, running and testing with Scala.js. For a quick start, have a look at our [basic tutorial](../tutorial/basic/). Load the sbt plugin (`project/plugins.sbt`) @@ -16,8 +16,13 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "{{ site.versions.scalaJS }}") Enable the plugin on the sbt project (`build.sbt`): {% highlight scala %} -lazy val root = project. - enablePlugins(ScalaJSPlugin) +lazy val root = project + .in(file(".")) + .enablePlugins(ScalaJSPlugin) + .settings( + // for an application with a main method + scalaJSUseMainModuleInitializer := true, + ) {% endhighlight %} If you are using a `Build.scala` definition, import the following: