You can use kantan.sbt’s scala.js support by adding the following SBT line:
addSbtPlugin("com.nrinaudo" % "kantan.sbt-scalajs" % "2.8.2")
This lets you declare cross-projects using kantanCrossProject
rather than crossProject
.
Calling kantanCrossProject(id)
will:
$id-jvm
$id-js
scoverage
for the JS project (because it’s currently broken)sbt-doctest
for the JS project (because it’s currently broken)boilerplate
to use the shared
source tree (until a better alternative is found)Additionally, the plugin declares the following new tasks:
checkStyleJS
: runs checkStyle
on all JS projectscheckStyleJVM
: runs checkStyle
on all JVM projectstestJS
: runs tests on all JS projectstestJVM
: runs tests on all JVM projectsFinally, the two following commands are added:
validateJS
: runs validation on all JS projects. This does not include code coverage or documentationvalidateJVM
: runs full validation on all JVM projects.