-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
44 lines (33 loc) · 1.05 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name := """amazebot"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
"org.antlr" % "antlr-runtime" % "3.5.2",
"org.codehaus.janino" % "janino" % "3.0.7",
"org.ow2.asm" % "asm-debug-all" % "5.2",
"org.python" % "jython-standalone" % "2.7.1",
ws
)
libraryDependencies += scalaVersion("org.scala-lang" % "scala-compiler" % _ ).value
lazy val elmMake = taskKey[Seq[File]]("elm-make")
elmMake := {
Seq(
"bash", "-c",
"elm-make app/assets/javascripts/Main.elm " +
"--output public/javascripts/main.js " +
"--yes --debug --warn"
).! match {
case 0 =>
streams.value.log.success("elm-make completed.")
Seq(new File("public/javascripts/main.js"))
case 127 =>
streams.value.log.warn("elm-make not found in PATH. Skipping Elm build.")
Nil
case status =>
throw new IllegalArgumentException(
s"elm-make failed with non-zero exit ${status}"
)
}
}
sourceGenerators in Assets += elmMake.taskValue