forked from cognitect/async-webinar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
55 lines (45 loc) · 2.38 KB
/
build.sbt
File metadata and controls
55 lines (45 loc) · 2.38 KB
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 := "Asynchronous Workflows"
version := "0.0"
description := "Scala.js CSP Application with Async Await in sequential workflow"
organization := "io.github.serioussoftware"
organizationName := "Serious Software"
organizationHomepage := Some(url("http://serioussoftware.github.io"))
homepage := Some(url("http://serioussoftware.github.io"))
startYear := Some(2015)
licenses += "EUPL v.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.0"
libraryDependencies ++= Seq(
"be.doeraene" %%% "scalajs-jquery" % "0.9.1",
"com.lihaoyi" %%% "scalatags" % "0.6.2",
"org.scala-js" %%% "scalajs-dom" % "0.9.1",
"org.scalatest" %%% "scalatest" % "3.0.1" % "test",
"org.scala-lang.modules" %% "scala-async" % "0.9.6"
)
scalacOptions in (Compile,doc) ++= Seq("-doc-root-content", baseDirectory.value+"/src/main/scala-2.11/root-doc.md",
"-groups", "-implicits")
// ** Scala.js configuration **
// lazy val root = (project in file(".")).
enablePlugins(ScalaJSPlugin)
// Necessary for testing
jsDependencies += RuntimeDOM
jsEnv := PhantomJSEnv(autoExit = false).value
// 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 := true
persistLauncher in Test := false
// Will create [normalizedName]-jsdeps.js containing all JavaScript libraries
jsDependencies += "org.webjars" % "jquery" % "3.1.1" / "3.1.1/jquery.js"
// jsDependencies += "org.webjars" % "bootstrap" % "3.3.6" / "bootstrap.js" minified "bootstrap.min.js" dependsOn "2.2.4/jquery.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)}