mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-06 15:15:58 +00:00
Initial project setup
This commit is contained in:
parent
8725487cc0
commit
74a79a79d9
25
build.sbt
25
build.sbt
@ -264,6 +264,24 @@ ${lines.map(_._1).mkString(",\n")}
|
|||||||
)
|
)
|
||||||
.dependsOn(common)
|
.dependsOn(common)
|
||||||
|
|
||||||
|
val query =
|
||||||
|
crossProject(JSPlatform, JVMPlatform)
|
||||||
|
.crossType(CrossType.Pure)
|
||||||
|
.in(file("modules/query"))
|
||||||
|
.settings(sharedSettings)
|
||||||
|
.settings(testSettings)
|
||||||
|
.settings(
|
||||||
|
name := "docspell-query",
|
||||||
|
libraryDependencies +=
|
||||||
|
Dependencies.catsParseJS.value
|
||||||
|
)
|
||||||
|
.jvmSettings(
|
||||||
|
libraryDependencies +=
|
||||||
|
Dependencies.scalaJsStubs
|
||||||
|
)
|
||||||
|
val queryJVM = query.jvm
|
||||||
|
val queryJS = query.js
|
||||||
|
|
||||||
val store = project
|
val store = project
|
||||||
.in(file("modules/store"))
|
.in(file("modules/store"))
|
||||||
.disablePlugins(RevolverPlugin)
|
.disablePlugins(RevolverPlugin)
|
||||||
@ -284,7 +302,7 @@ val store = project
|
|||||||
Dependencies.calevCore ++
|
Dependencies.calevCore ++
|
||||||
Dependencies.calevFs2
|
Dependencies.calevFs2
|
||||||
)
|
)
|
||||||
.dependsOn(common)
|
.dependsOn(common, queryJVM)
|
||||||
|
|
||||||
val extract = project
|
val extract = project
|
||||||
.in(file("modules/extract"))
|
.in(file("modules/extract"))
|
||||||
@ -425,6 +443,7 @@ val webapp = project
|
|||||||
openapiSpec := (restapi / Compile / resourceDirectory).value / "docspell-openapi.yml",
|
openapiSpec := (restapi / Compile / resourceDirectory).value / "docspell-openapi.yml",
|
||||||
openapiElmConfig := ElmConfig().withJson(ElmJson.decodePipeline)
|
openapiElmConfig := ElmConfig().withJson(ElmJson.decodePipeline)
|
||||||
)
|
)
|
||||||
|
.dependsOn(queryJS)
|
||||||
|
|
||||||
// --- Application(s)
|
// --- Application(s)
|
||||||
|
|
||||||
@ -594,7 +613,9 @@ val root = project
|
|||||||
backend,
|
backend,
|
||||||
webapp,
|
webapp,
|
||||||
restapi,
|
restapi,
|
||||||
restserver
|
restserver,
|
||||||
|
queryJVM,
|
||||||
|
queryJS
|
||||||
)
|
)
|
||||||
|
|
||||||
// --- Helpers
|
// --- Helpers
|
||||||
|
3
modules/query/src/main/scala/docspell/query/Query.scala
Normal file
3
modules/query/src/main/scala/docspell/query/Query.scala
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
package docspell.query
|
||||||
|
|
||||||
|
case class Query(raw: String)
|
@ -0,0 +1,13 @@
|
|||||||
|
package docspell.query
|
||||||
|
|
||||||
|
import scala.scalajs.js.annotation._
|
||||||
|
|
||||||
|
@JSExportTopLevel("DsQueryParser")
|
||||||
|
object QueryParser {
|
||||||
|
|
||||||
|
@JSExport
|
||||||
|
def parse(input: String): Either[String, Query] = {
|
||||||
|
Right(Query("parsed: " + input))
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package docspell.build
|
package docspell.build
|
||||||
|
|
||||||
import sbt._
|
import sbt._
|
||||||
|
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
|
||||||
|
|
||||||
object Dependencies {
|
object Dependencies {
|
||||||
|
|
||||||
@ -8,6 +9,7 @@ object Dependencies {
|
|||||||
val BetterMonadicForVersion = "0.3.1"
|
val BetterMonadicForVersion = "0.3.1"
|
||||||
val BitpeaceVersion = "0.6.0"
|
val BitpeaceVersion = "0.6.0"
|
||||||
val CalevVersion = "0.4.1"
|
val CalevVersion = "0.4.1"
|
||||||
|
val CatsParseVersion = "0.3.1"
|
||||||
val CirceVersion = "0.13.0"
|
val CirceVersion = "0.13.0"
|
||||||
val ClipboardJsVersion = "2.0.6"
|
val ClipboardJsVersion = "2.0.6"
|
||||||
val DoobieVersion = "0.10.0"
|
val DoobieVersion = "0.10.0"
|
||||||
@ -41,6 +43,15 @@ object Dependencies {
|
|||||||
val JQueryVersion = "3.5.1"
|
val JQueryVersion = "3.5.1"
|
||||||
val ViewerJSVersion = "0.5.8"
|
val ViewerJSVersion = "0.5.8"
|
||||||
|
|
||||||
|
val catsParse = Seq(
|
||||||
|
"org.typelevel" %% "cats-parse" % CatsParseVersion
|
||||||
|
)
|
||||||
|
val catsParseJS =
|
||||||
|
Def.setting("org.typelevel" %%% "cats-parse" % CatsParseVersion)
|
||||||
|
|
||||||
|
val scalaJsStubs =
|
||||||
|
"org.scala-js" %% "scalajs-stubs" % "1.0.0" % "provided"
|
||||||
|
|
||||||
val kittens = Seq(
|
val kittens = Seq(
|
||||||
"org.typelevel" %% "kittens" % KittensVersion
|
"org.typelevel" %% "kittens" % KittensVersion
|
||||||
)
|
)
|
||||||
|
@ -7,5 +7,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")
|
|||||||
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
|
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
|
||||||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.0")
|
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.0")
|
||||||
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
|
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
|
||||||
|
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
|
||||||
|
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.0")
|
||||||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
|
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
|
||||||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5")
|
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user