a buildable scala-js (sbt ~fastLinkJS) project that does nothing.

This commit is contained in:
fiatjaf 2022-02-22 10:01:20 -03:00
commit fecbf2d940
7 changed files with 32 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
target
.bsp

2
.scalafmt.conf Normal file
View File

@ -0,0 +1,2 @@
version = 3.4.3
runner.dialect = scala213

9
build.sbt Normal file
View File

@ -0,0 +1,9 @@
enablePlugins(ScalaJSPlugin)
name := "app"
scalaVersion := "2.13.7"
scalaJSUseMainModuleInitializer := true
mainClass := Some("app.Main")
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "2.1.0"

4
index.html Normal file
View File

@ -0,0 +1,4 @@
<meta charset=utf-8>
<title>title</title>
<body></body>
<script src=target/scala-2.13/app-fastopt/main.js></script>

1
project/build.properties Normal file
View File

@ -0,0 +1 @@
sbt.version=1.5.5

1
project/plugins.sbt Normal file
View File

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

View File

@ -0,0 +1,13 @@
package app
import org.scalajs.dom
import org.scalajs.dom.document
object Main {
def main(args: Array[String]): Unit = {
val div = document.createElement("div")
div.id = "main"
document.body.appendChild(div)
println("Hello!")
}
}