mirror of https://github.com/sbt/sbt.git
Add scripted scala3-sandwich-sjs
This commit is contained in:
parent
97f06d87b0
commit
4a8fe457f8
|
|
@ -0,0 +1,9 @@
|
|||
package app
|
||||
|
||||
import mylib._
|
||||
|
||||
object Main {
|
||||
def main(args: Array[String]): Unit = {
|
||||
println(MyLib.square(5))
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
ThisBuild / scalaVersion := "2.13.4"
|
||||
ThisBuild / scalacOptions += "-Ytasty-reader"
|
||||
|
||||
lazy val scala3code = project
|
||||
.enablePlugins(ScalaJSPlugin)
|
||||
.settings(scalaVersion := "3.0.0-M1")
|
||||
|
||||
lazy val app = project
|
||||
.enablePlugins(ScalaJSPlugin)
|
||||
.dependsOn(scala3code)
|
||||
.settings(
|
||||
scalaVersion := "2.13.4",
|
||||
scalacOptions += "-Ytasty-reader",
|
||||
scalaJSUseMainModuleInitializer := true
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.1")
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package mylib
|
||||
|
||||
object MyLib {
|
||||
def square(x: Int): Int = x * x
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
> app/run
|
||||
Loading…
Reference in New Issue