-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.sbt
55 lines (39 loc) · 1.71 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
53
54
55
name := "newsleak"
version := "1.0.0"
scalaVersion := "2.11.7"
scalacOptions += "-feature"
libraryDependencies ++= Seq(
jdbc,
cache,
"org.postgresql" % "postgresql" % "9.4-1206-jdbc41", // PostgreSQL License
"org.scalikejdbc" %% "scalikejdbc" % "2.5.0", // ApacheV2
"org.scalikejdbc" %% "scalikejdbc-config" % "2.5.0", // ApacheV2
"org.scalikejdbc" %% "scalikejdbc-play-initializer" % "2.5.1", // ApacheV2
"org.elasticsearch" % "elasticsearch" % "2.3.5", // ApacheV2
"commons-io" % "commons-io" % "2.4"
)
routesImport += "util.Binders._"
routesGenerator := InjectedRoutesGenerator
lazy val root = (project in file(".")).enablePlugins(PlayScala, SbtWeb)
// Run `make build` before `sbt dist`
lazy val webpackBuild = taskKey[Unit]("Build production js bundle.")
webpackBuild := {
"make build" !
}
(packageBin in Universal) <<= (packageBin in Universal) dependsOn webpackBuild
// Disable documentation to speed up compilation
// sources in (Compile, doc) := Seq.empty
scalacOptions in (Compile, doc) := List(
"-skip-packages", Seq("router", "scalikejdbc").mkString(":"),
"-doc-title", "Newsleak ScalaDoc"
)
publishArtifact in (Compile, packageDoc) := false
// Configure the steps of the asset pipeline (used in stage and dist tasks)
// TODO: ***remove rjs for non-production deployment***
// rjs = RequireJS, uglifies, shrinks to one file, replaces WebJars with CDN
// digest = Adds hash to filename
// gzip = Zips all assets, Asset controller serves them automatically when client accepts them
pipelineStages := Seq(/*rjs,*/ digest, gzip)
// The r.js optimizer won't find jsRoutes so we must tell it to ignore it
RjsKeys.paths += ("jsRoutes" -> ("/jsroutes" -> "empty:"))
packageName in Universal := "newsleak-ui"