From 63dc6fe13d62e3e3ab3c634cd8a034891ef250fa Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Sun, 30 May 2021 09:58:58 +0200 Subject: [PATCH] Remove compiled scalajs files from final package Only the js file is necessary, the intermediate sjs files are not needed at runtime. --- build.sbt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index c5d74fe7..f126dbf5 100644 --- a/build.sbt +++ b/build.sbt @@ -556,7 +556,14 @@ val restserver = project "-Xmx150M", "-XX:+UseG1GC" ), - Revolver.enableDebugging(port = 5050, suspend = false) + Revolver.enableDebugging(port = 5050, suspend = false), + Universal / mappings := { + val allMappings = (Universal / mappings).value + allMappings.filter { + //scalajs artifacts are not needed at runtime + case (file, name) => !name.contains("_sjs1_") + } + } ) .dependsOn(restapi, joexapi, backend, webapp, ftssolr) @@ -771,7 +778,7 @@ def packageTools(logger: Logger, dir: File, version: String): Seq[File] = { addCommandAlias( "make", - ";set webapp/elmCompileMode := ElmCompileMode.Production; set webapp/stylesMode := StylesMode.Prod ;root/openapiCodegen ;root/test:compile" + ";set webapp/elmCompileMode := ElmCompileMode.Production; set webapp/stylesMode := StylesMode.Prod ;root/openapiCodegen ;root/Test/compile" ) addCommandAlias("make-zip", ";restserver/universal:packageBin ;joex/universal:packageBin") addCommandAlias("make-deb", ";restserver/debian:packageBin ;joex/debian:packageBin")