forked from PortfolioFvdB/sfwc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
66 lines (55 loc) · 3.27 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
56
57
58
59
60
61
62
63
64
65
66
lazy val commonSettings = Seq(
name := "Full Window Html5 Canvas",
version := "0.0",
description := "Template for Scala.js client only using HTML canvas to fill the window, repainted on window resize.",
organization := "nl.amsscala",
organizationName := "Amsterdam.scala Meetup Group",
organizationHomepage := Some(url("http://www.meetup.com/amsterdam-scala/")),
homepage := Some(url("http://github.com/amsterdam-scala/Sjs-Full-Window-HTML5-Canvas")),
startYear := Some(2016),
licenses += "EUPL-1.1" -> url("http://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11")
)
// KEEP THIS normalizedName CONSTANTLY THE SAME, otherwise the outputted JS filename will be changed.
normalizedName := "main"
// ** Scala dependencies **
scalaVersion in ThisBuild := "2.12.1"
scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
scalacOptions in (Compile,doc) ++=
Seq("-doc-root-content", baseDirectory.value + "/src/main/scala-2.12/root-doc.md", "-groups", "-implicits")
libraryDependencies ++= Seq(
// "be.doeraene" %%% "scalajs-jquery" % "0.9.1",
"com.github.cquiroz" %%% "scala-java-locales" % "0.4.0-cldr30",
//"com.github.karasiq" %%% "scalajs-bootstrap" % "1.1.2",
"com.lihaoyi" %%% "scalatags" % "0.6.3",
// "com.lihaoyi" %%% "upickle" % "0.4.4",
"io.github.soc" %%% "scala-java-time" % "2.0.0-M5",
// "io.surfkit" %%% "scalajs-google-maps"% "0.1-SNAPSHOT",
"org.scala-js" %%% "scalajs-dom" % "0.9.1",
"org.scalatest" %% "scalatest" % "3.0.1" % "test")
scalacOptions in (Compile,doc) ++= Seq("-doc-root-content", baseDirectory.value + "/src/main/scala-2.12/root-doc.md",
"-groups", "-implicits")
// ** Scala.js configuration **
lazy val root: Project = (project in file(".")).enablePlugins(ScalaJSPlugin).settings(commonSettings: _*).
configure(InBrowserTesting.js)
// jsEnv in Test := new org.scalajs.jsenv.selenium.SeleniumJSEnv(org.scalajs.jsenv.selenium.Chrome())
// Firefox works only with FireFox 46.0.1-, and since 48.0 GeckoDriver (aka Marionette)
// (https://ftp.mozilla.org/pub/firefox/releases/46.0.1/win64-EME-free/en-US/Firefox%20Setup%2046.0.1.exe)
// jsEnv in Test := new org.scalajs.jsenv.selenium.SeleniumJSEnv(org.scalajs.jsenv.selenium.Firefox())
// If true, a launcher script src="../[normalizedName]-launcher.js will be generated
// that always calls the main def indicated by the used JSApp trait.
persistLauncher in Compile := true
persistLauncher in Test := false
// Will create [normalizedName]-jsdeps.js containing all JavaScript libraries
jsDependencies ++= Seq(
// "org.webjars" % "jquery" % "3.1.0" / "3.1.0/jquery.js",
"org.webjars" % "jstimezonedetect" % "1.0.6" / "1.0.6/jstz.js")
skip in packageJSDependencies := false // All JavaScript dependencies to be concatenated to a single file
// ScalaTest settings //
// testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-oF")
// Li Haoyi's Workbench settings **
if (sys.env.isDefinedAt("CI")) {
println("[Info] Li Haoyi's workbench disabled ", sys.env.getOrElse("CI", "?"))
Seq.empty
} else {
refreshBrowsers <<= refreshBrowsers.triggeredBy(fastOptJS in Compile)
enablePlugins(WorkbenchPlugin)}