forked from chandu0101/sri-web-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
43 lines (30 loc) · 1.54 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
enablePlugins(ScalaJSPlugin)
name := "sri-web-template"
scalaVersion := "2.11.8"
val sriVersion = "0.5.0"
val sriscalaCssVersion = "2016.5.0"
val reactJSVersion = "15.1.0"
val assetsDir = "assets/"
jsDependencies ++= Seq(
"org.webjars.npm" % "react" % reactJSVersion / "dist/react.js" commonJSName "React" minified "react.min.js",
"org.webjars.npm" % "react-dom" % reactJSVersion / "react-dom.js" commonJSName "ReactDOM" minified "react-dom.min.js" dependsOn "dist/react.js",
"org.webjars.npm" % "history" % "3.0.0-2" / "history.js" commonJSName "History" minified "history.min.js"
)
// creates single js resource file for easy integration in html page
skip in packageJSDependencies := false
// where jsDependencies go
crossTarget in (Compile, packageJSDependencies) := file(assetsDir)
crossTarget in (Compile, packageMinifiedJSDependencies) := file(assetsDir)
libraryDependencies ++= Seq(
"com.github.chandu0101.sri" %%% "web" % sriVersion,
"com.github.chandu0101.sri" %%% "scalacss" % sriscalaCssVersion
)
// copy fastOptJS/fullOptJS fiels to assets directory
crossTarget in(Compile, fullOptJS) := file(assetsDir)
crossTarget in(Compile, fastOptJS) := file(assetsDir)
crossTarget in(Compile, packageScalaJSLauncher) := file(assetsDir)
artifactPath in(Compile, fastOptJS) := ((crossTarget in(Compile, fastOptJS)).value /
((moduleName in fastOptJS).value + "-opt.js"))
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature",
"-language:postfixOps", "-language:implicitConversions",
"-language:higherKinds", "-language:existentials")