Skip to content

Commit 76edb60

Browse files
committed
Fix #599: Expand a bit the sbt setup on the doc/project/ page.
1 parent 93c933a commit 76edb60

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

doc/project/index.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Scala.js project structure
44
---
55

66

7-
Scala.js comes with an sbt plugin that facilitates compiling, running and testing with Scala.js. For a quick start,
7+
Scala.js comes with an sbt plugin that facilitates compiling, running and testing with Scala.js. For a quick start,
88
have a look at our [basic tutorial](../tutorial/basic/).
99

1010
Load the sbt plugin (`project/plugins.sbt`)
@@ -16,8 +16,13 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "{{ site.versions.scalaJS }}")
1616
Enable the plugin on the sbt project (`build.sbt`):
1717

1818
{% highlight scala %}
19-
lazy val root = project.
20-
enablePlugins(ScalaJSPlugin)
19+
lazy val root = project
20+
.in(file("."))
21+
.enablePlugins(ScalaJSPlugin)
22+
.settings(
23+
// for an application with a main method
24+
scalaJSUseMainModuleInitializer := true,
25+
)
2126
{% endhighlight %}
2227

2328
If you are using a `Build.scala` definition, import the following:

0 commit comments

Comments
 (0)