This repository has been archived by the owner on Feb 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
91 lines (85 loc) · 3.02 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
val reactJS = "17.0.2"
val copyToClipboard = "3.3.1"
val scalaJsReact = "2.1.1"
Global / onChangedBuildSource := ReloadOnSourceChanges
Global / resolvers += Resolver.sonatypeRepo("public")
inThisBuild(
List(
homepage := Some(url("https://github.com/cquiroz/scalajs-react-clipboard")),
licenses := Seq(
"BSD 3-Clause License" -> url(
"https://opensource.org/licenses/BSD-3-Clause"
)
),
developers := List(
Developer(
"cquiroz",
"Carlos Quiroz",
"carlos.m.quiroz@gmail.com",
url("https://github.com/cquiroz")
)
),
scmInfo := Some(
ScmInfo(
url("https://github.com/cquiroz/scalajs-react-clipboard"),
"scm:git:git@github.com:cquiroz/scalajs-react-clipboard.git"
)
)
)
)
val root =
project
.in(file("."))
.settings(commonSettings: _*)
.aggregate(facade)
.settings(
name := "root",
// No, SBT, we don't want any artifacts for root.
// No, not even an empty jar.
publish := {},
publishLocal := {},
publishArtifact := false,
Keys.`package` := file("")
)
lazy val facade =
project
.in(file("facade"))
.enablePlugins(ScalaJSBundlerPlugin)
.settings(commonSettings: _*)
.settings(
name := "react-clipboard",
Compile / npmDependencies ++= Seq(
"react" -> reactJS,
"react-dom" -> reactJS,
"copy-to-clipboard" -> copyToClipboard
),
// Requires the DOM for tests
Test / requireJsDomEnv := true,
// Use yarn as it is faster than npm
useYarn := true,
webpack / version := "4.44.1",
webpackCliVersion / version := "3.3.11",
startWebpackDevServer / version := "3.11.0",
Test / webpackConfigFile := Some(
baseDirectory.value / "src" / "webpack" / "test.webpack.config.js"
),
scalaJSUseMainModuleInitializer := false,
// Compile tests to JS using fast-optimisation
Test / scalaJSStage := FastOptStage,
libraryDependencies ++= Seq(
"com.github.japgolly.scalajs-react" %%% "core" % scalaJsReact,
"com.github.japgolly.scalajs-react" %%% "test" % scalaJsReact % Test,
"io.github.cquiroz.react" %%% "common" % "0.17.0",
"io.github.cquiroz.react" %%% "test" % "0.17.0" % Test,
"org.scalameta" %%% "munit" % "0.7.29" % Test,
"org.typelevel" %%% "cats-core" % "2.7.0" % Test
),
testFrameworks += new TestFramework("munit.Framework")
)
lazy val commonSettings = Seq(
scalaVersion := "2.13.10",
organization := "io.github.cquiroz.react",
sonatypeProfileName := "io.github.cquiroz",
description := "scala.js facade for react-copy-to-clipboard",
homepage := Some(url("https://github.com/cquiroz/scalajs-react-clipboard"))
)