Skip to content

Commit f8e3a24

Browse files
author
Mateusz Starzec
committed
SBT settings cleanup
1 parent 64677a4 commit f8e3a24

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

build.sbt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ name := "udash-jquery"
55
inThisBuild(Seq(
66
version := "3.0.0-SNAPSHOT",
77
organization := "io.udash",
8+
))
9+
10+
val commonSettings = Seq(
811
scalaVersion := "2.12.7",
912
crossScalaVersions := Seq("2.11.12", "2.12.7"),
1013
scalacOptions ++= Seq(
@@ -28,13 +31,13 @@ inThisBuild(Seq(
2831
"-Ycache-macro-class-loader:last-modified"
2932
) else Seq.empty
3033
}
31-
))
34+
)
3235

3336
val commonJSSettings = Seq(
3437
Compile / emitSourceMaps := true,
3538
Test / parallelExecution := false,
3639
Test / scalaJSStage := FastOptStage,
37-
// ScalaJSBundlerPlugin does not work with scalajs-env-selenium:
40+
// ScalaJSBundlerPlugin does not work with scalajs-env-selenium:
3841
// https://github.com/scalacenter/scalajs-bundler/issues/89
3942
// Test / jsEnv := new SeleniumJSEnv(browserCapabilities),
4043
scalacOptions += {
@@ -48,6 +51,7 @@ val commonJSSettings = Seq(
4851
lazy val root = project.in(file("."))
4952
.enablePlugins(ScalaJSBundlerPlugin)
5053
.settings(
54+
commonSettings,
5155
commonJSSettings,
5256

5357
libraryDependencies ++= Seq(

example/build.sbt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name := "jquery-demo"
33
inThisBuild(Seq(
44
version := "3.0.0",
55
organization := "io.udash",
6+
))
7+
8+
val commonSettings = Seq(
69
scalaVersion := "2.12.7",
710
crossScalaVersions := Seq("2.11.12", "2.12.7"),
811
scalacOptions ++= Seq(
@@ -25,13 +28,19 @@ inThisBuild(Seq(
2528
"-Ycache-macro-class-loader:last-modified"
2629
) else Seq.empty
2730
},
28-
))
31+
32+
libraryDependencies ++= Dependencies.deps.value
33+
)
2934

3035
val generatedGlobalDir = file("generated/global")
3136
val copyAssets = taskKey[Unit]("Copies all assets to the target directory.")
37+
val root = project.in(file(".")).enablePlugins(ScalaJSPlugin)
38+
.settings(commonSettings)
39+
3240
val `jquery-global-demo` = project.in(file("global-demo")).enablePlugins(ScalaJSPlugin)
3341
.settings(
34-
libraryDependencies ++= Dependencies.deps.value,
42+
commonSettings,
43+
3544
jsDependencies ++= Dependencies.jsDeps.value,
3645

3746
sourceDirsSettings(_.getParentFile),
@@ -69,8 +78,8 @@ val compileStatics = taskKey[Unit]("Compiles all static files.")
6978
val `jquery-bundler-demo` = project.in(file("bundler-demo"))
7079
.enablePlugins(ScalaJSBundlerPlugin)
7180
.settings(
72-
libraryDependencies ++= Dependencies.deps.value,
73-
81+
commonSettings,
82+
7483
sourceDirsSettings(_.getParentFile),
7584

7685
Compile / scalaJSUseMainModuleInitializer := true,

0 commit comments

Comments
 (0)