mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 10:58:26 +00:00
Serving scalajs artifacts and provide errors to js
This commit is contained in:
17
build.sbt
17
build.sbt
@ -86,7 +86,7 @@ val stylesSettings = Seq(
|
||||
Compile / resourceGenerators += stylesBuild.taskValue
|
||||
)
|
||||
|
||||
val webjarSettings = Seq(
|
||||
def webjarSettings(queryJS: Project) = Seq(
|
||||
Compile / resourceGenerators += Def.task {
|
||||
copyWebjarResources(
|
||||
Seq((sourceDirectory in Compile).value / "webjar"),
|
||||
@ -96,6 +96,18 @@ val webjarSettings = Seq(
|
||||
streams.value.log
|
||||
)
|
||||
}.taskValue,
|
||||
Compile / resourceGenerators += Def.task {
|
||||
val logger = streams.value.log
|
||||
val out = (queryJS/Compile/fullOptJS).value
|
||||
logger.info(s"Produced query js file: ${out.data}")
|
||||
copyWebjarResources(
|
||||
Seq(out.data),
|
||||
(Compile/resourceManaged).value,
|
||||
name.value,
|
||||
version.value,
|
||||
logger
|
||||
)
|
||||
}.taskValue,
|
||||
watchSources += Watched.WatchSource(
|
||||
(Compile / sourceDirectory).value / "webjar",
|
||||
FileFilter.globFilter("*.js") || FileFilter.globFilter("*.css"),
|
||||
@ -273,7 +285,6 @@ ${lines.map(_._1).mkString(",\n")}
|
||||
val query =
|
||||
crossProject(JSPlatform, JVMPlatform)
|
||||
.withoutSuffixFor(JVMPlatform)
|
||||
.crossType(CrossType.Pure)
|
||||
.in(file("modules/query"))
|
||||
.disablePlugins(RevolverPlugin)
|
||||
.settings(sharedSettings)
|
||||
@ -446,7 +457,7 @@ val webapp = project
|
||||
.settings(sharedSettings)
|
||||
.settings(elmSettings)
|
||||
.settings(stylesSettings)
|
||||
.settings(webjarSettings)
|
||||
.settings(webjarSettings(query.js))
|
||||
.settings(
|
||||
name := "docspell-webapp",
|
||||
openapiTargetLanguage := Language.Elm,
|
||||
|
Reference in New Issue
Block a user