Add scripted scala3-sandwich-sjs

This commit is contained in:
Adrien Piquerez 2020-12-18 11:52:24 +01:00
parent 97f06d87b0
commit 4a8fe457f8
5 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,9 @@
package app
import mylib._
object Main {
def main(args: Array[String]): Unit = {
println(MyLib.square(5))
}
}

View File

@ -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
)

View File

@ -0,0 +1 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.1")

View File

@ -0,0 +1,5 @@
package mylib
object MyLib {
def square(x: Int): Int = x * x
}

View File

@ -0,0 +1 @@
> app/run