Created
July 4, 2016 18:09
-
-
Save gregghz/0086cd6b82eb2680a41b356e07b296ca to your computer and use it in GitHub Desktop.
build.sbt for Play 2.5 + Angulate2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Angulate2Plugin._ | |
lazy val commonSettings = Seq( | |
organization := "com.gregghz", | |
version := "1.0.0", | |
scalaVersion := "2.11.8", | |
scalacOptions ++= Seq( | |
"-deprecation", | |
"-feature", | |
"-Xfatal-warnings" | |
), | |
resolvers += Resolver.sonatypeRepo("snapshots") | |
) | |
lazy val server = project.in(file("server")). | |
enablePlugins(PlayScala, PlayScalaJS, SbtWeb). | |
settings(commonSettings: _*). | |
settings( | |
compile in Compile <<= (compile in Compile) dependsOn (fastOptJS in (ngClient, Compile)), | |
unmanagedResources in Assets += baseDirectory.value / "../ngClient/target/scala-2.11/ngclient-sjsx.js", | |
scalaJSProjects := Seq(ngClient), | |
routesGenerator := InjectedRoutesGenerator, | |
pipelineStages := Seq(scalaJSProd), | |
libraryDependencies ++= Seq( | |
"com.softwaremill.macwire" %% "macros" % "2.2.2" % "provided" | |
) | |
). | |
aggregate(Project.projectToRef(ngClient)). | |
dependsOn(sharedJvm) | |
lazy val ngClient = project.in(file("ngClient")). | |
settings(commonSettings: _*). | |
enablePlugins(Angulate2Plugin, ScalaJSPlugin, ScalaJSPlay). | |
dependsOn(sharedJs). | |
settings(relativeSourceMaps := true) | |
lazy val shared = (crossProject.crossType(CrossType.Pure) in file("shared")). | |
settings(commonSettings: _*). | |
jsConfigure(_ enablePlugins ScalaJSPlay) | |
lazy val sharedJvm = shared.jvm | |
lazy val sharedJs = shared.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment