Skip to content

Fix #599: Expand a bit the sbt setup on the doc/project/ page. #607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions doc/project/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand All @@ -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:
Expand Down