-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
52 lines (44 loc) · 1.43 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
44
45
46
47
48
49
50
51
52
name := "scalajs-angulate-todomvc"
val commonSettings = Seq(
organization := "biz.enef",
version := "0.2",
scalaVersion := "2.11.6",
scalacOptions ++= Seq("-deprecation","-feature","-Xlint"),
resolvers += "karchedon-repo" at "http://maven.karchedon.de/",
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
)
val angulateDebugFlags = Seq(
"runtimeLogging"
//"ModuleMacros.debug",
//"ControllerMacros.debug"
//"DirectiveMacros.debug"
//"ServiceMacros.debug"
//"HttpPromiseMacros.debug"
).map( f => s"-Xmacro-settings:biz.enef.angulate.$f" )
lazy val jvm = project.
settings(commonSettings: _*).
settings(
libraryDependencies ++= Seq(
"biz.enef" %% "surf-akka-rest" % "0.1-SNAPSHOT"
)
)
lazy val js = project.
settings(commonSettings: _*).
settings(
scalacOptions ++= angulateDebugFlags,
persistLauncher in Compile := true,
persistLauncher in Test := false,
libraryDependencies ++= Seq(
"biz.enef" %%% "scalajs-angulate" % "0.2.2"
)
).
enablePlugins(ScalaJSPlugin)
// standalone application (server+web client in a single fat JAR)
lazy val app = project.in( file(".") ).
dependsOn( jvm ).
settings(commonSettings:_*).
settings(
// build JS and add JS resources
(compile in Compile) <<= (compile in Compile).dependsOn(fastOptJS in (js,Compile)),
mainClass in (Compile,run) := Some("todomvc.example.Server")
)