-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
90 lines (85 loc) · 2.99 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
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
Global / onChangedBuildSource := ReloadOnSourceChanges
inThisBuild(
Seq(
organization := "io.github.fun-stack",
scalaVersion := "2.13.15",
licenses := Seq("MIT License" -> url("https://opensource.org/licenses/MIT")),
homepage := Some(url("https://github.com/fun-stack/local-env")),
scmInfo := Some(
ScmInfo(
url("https://github.com/fun-stack/local-env"),
"scm:git:[email protected]:fun-stack/local-env.git",
Some("scm:git:[email protected]:fun-stack/local-env.git"),
),
),
pomExtra :=
<developers>
<developer>
<id>jkaroff</id>
<name>Johannes Karoff</name>
<url>https://github.com/cornerman</url>
</developer>
</developers>,
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
),
)
lazy val commonSettings = Seq(
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.13.3" cross CrossVersion.full),
libraryDependencies ++=
Deps.scalatest.value % Test ::
Nil,
scalacOptions --= Seq("-Xfatal-warnings"),
)
lazy val jsSettings = Seq(
useYarn := true,
scalacOptions += {
val githubRepo = "fun-stack/local-env"
val local = baseDirectory.value.toURI
val subProjectDir = baseDirectory.value.getName
val remote = s"https://raw.githubusercontent.com/${githubRepo}/${git.gitHeadCommit.value.get}"
s"-P:scalajs:mapSourceURI:$local->$remote/${subProjectDir}/"
},
)
lazy val cli = project
.in(file("cli"))
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin, ScalablyTypedConverterPlugin)
.settings(commonSettings, jsSettings)
.settings(
name := "fun-local-env",
scalaJSUseMainModuleInitializer := true,
webpackConfigFile := Some(baseDirectory.value / "webpack.config.js"),
libraryDependencies ++=
Deps.cats.core.value ::
Deps.cats.effect.value ::
Deps.cats.alley.value ::
Deps.awsLambdaJS.value ::
Deps.scalaJS.secureRandom.value ::
Nil,
stIgnore ++= List(
"oidc-provider",
"express",
"bufferutil",
"utf-8-validate",
),
Compile / yarnExtraArgs ++= Seq(
"--ignore-engines",
),
Compile / npmDependencies ++= Seq(
/* "@types/oidc-provider" -> "^7.8.2", // TODO: crashes scalablytyped */
"express" -> "^4.17.3",
"oidc-provider" -> "^7.10.6",
"bufferutil" -> "^4.0.6",
"utf-8-validate" -> "^5.0.9",
"@types/node" -> "14.14.31",
"ws" -> "8.2.3",
"@types/ws" -> "8.2.0",
"jwt-decode" -> "^3.1.2",
),
Compile / npmDevDependencies ++= Seq(
"@babel/core" -> "^7.17.5",
"@babel/preset-env" -> "^7.16.11",
"babel-loader" -> "^8.2.3",
),
)