diff options
Diffstat (limited to 'project')
-rw-r--r-- | project/Js.scala | 20 | ||||
-rw-r--r-- | project/build.properties | 1 | ||||
-rw-r--r-- | project/plugins.sbt | 7 |
3 files changed, 28 insertions, 0 deletions
diff --git a/project/Js.scala b/project/Js.scala new file mode 100644 index 0000000..9afb064 --- /dev/null +++ b/project/Js.scala @@ -0,0 +1,20 @@ +import sbt._ +import sbt.Keys._ +import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ + +object Js { + + def dependsOnJs(proj: Project): Seq[Setting[_]] = Seq( + resourceGenerators in Compile += Def.task { + val js: File = (fastOptJS in (proj, Compile)).value.data + val map = js.getParentFile / (js.name + ".map") + val out = (resourceManaged in Compile).value / "assets" / "ui" / "js" + val toCopy = Seq( + js -> out / js.name, + map -> out / map.name + ) + IO.copy(toCopy).toSeq + }.taskValue + ) + +} diff --git a/project/build.properties b/project/build.properties new file mode 100644 index 0000000..2305049 --- /dev/null +++ b/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.1.4
\ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 0000000..a884d99 --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1,7 @@ +addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") +addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1") + +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.4.0") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.4.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.7") |