Skip to content

Commit

Permalink
add ScalaJS support
Browse files Browse the repository at this point in the history
  • Loading branch information
bpholt committed Jul 15, 2024
1 parent b3c9616 commit e702263
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ jobs:

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
run: mkdir -p target project/target
run: mkdir -p target jvm/target js/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
run: tar cf targets.tar target project/target
run: tar cf targets.tar target jvm/target js/target project/target

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
Expand Down
18 changes: 11 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ ThisBuild / mergifyStewardConfig ~= { _.map {
.withMergeMinors(true)
}}

lazy val `natchez-smithy4s` = project
lazy val `natchez-smithy4s` = crossProject(JVMPlatform, JSPlatform)
.crossType(CrossType.Full)
.in(file("."))
.enablePlugins(Smithy4sCodegenPlugin)
.settings(
Compile / smithy4sInputDirs := List(
(ThisBuild / baseDirectory).value / "shared" / "src" / "main" / "smithy",
),
libraryDependencies ++= {
Seq(
"com.disneystreaming.smithy4s" %% "smithy4s-core" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" %% "smithy4s-http4s" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" %% "smithy4s-cats" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" %% "smithy4s-json" % smithy4sVersion.value,
"org.tpolecat" %% "natchez-core" % "0.3.5",
"com.disneystreaming.smithy4s" %%% "smithy4s-core" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" %%% "smithy4s-http4s" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" %%% "smithy4s-cats" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" %%% "smithy4s-json" % smithy4sVersion.value,
"org.tpolecat" %%% "natchez-core" % "0.3.5",
)
},
)
.enablePlugins(Smithy4sCodegenPlugin)
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % "0.7.1")
addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.7.1")
addSbtPlugin("org.typelevel" % "sbt-typelevel-settings" % "0.7.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("com.disneystreaming.smithy4s" % "smithy4s-sbt-codegen" % "0.18.22")
File renamed without changes.

0 comments on commit e702263

Please sign in to comment.