From 7e7312fcf0835e4f3ccb8051bca37a95d0c52f0b Mon Sep 17 00:00:00 2001 From: davidontop Date: Sat, 26 Oct 2024 22:15:55 +0200 Subject: [PATCH] chore: bump version and cleanup publishing --- README.md | 9 ++-- build.sbt | 49 ++++++++++--------- .../sfs/renderers/StringRenderer.scala | 2 +- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index e9b9916..2cad944 100644 --- a/README.md +++ b/README.md @@ -7,23 +7,20 @@ SFS full name ScalaFullStack is a collection of libraries to make full stack dev This project is far from being ready to use so for now these also include planned features for 1.0 - [X] SSR support -- [ ] CSR support +- [X] CSR support - [ ] Hydration - [ ] router -- [ ] ReScala reactive backend - [ ] zio server integration +- [ ] http4s server integration ### TODO - [ ] Type safety, eliminate ? as generic param and asInstanceOf where possible -- [ ] AirStream reactive backend - [ ] other server integrations ## Packages -- sfs - different renderers (String, dom, hydration) and reactivity bindings +- sfs - different renderers (String, dom, hydration) and reactivity bindings and router - dom - shared jvm/js html builder which includes: tags, attributes, props, svg, utils - possible to use from other libraries which need a js+jvm html/dom builder -- router - implements a universal router for ssr and csr/hydration -- reactive/* - various reactive backends - integrations/* - various server integrations \ No newline at end of file diff --git a/build.sbt b/build.sbt index 7ba3a1b..fed3994 100644 --- a/build.sbt +++ b/build.sbt @@ -1,29 +1,28 @@ ThisBuild / scalaVersion := "3.5.2" ThisBuild / versionScheme := Some("semver-spec") -ThisBuild / publishMavenStyle := true -ThisBuild / publishTo := Some( - "GitHub Package Registry" at "https://maven.pkg.github.com/davidon-top/sfs" +lazy val publishSettings = Seq( + publishMavenStyle := true, + publishTo := Some( + "GitHub Package Registry" at "https://maven.pkg.github.com/davidon-top/sfs" + ), + credentials += Credentials( + "GitHub Package Registry", + "maven.pkg.github.com", + sys.env("THEHUB_USERNAME"), + sys.env("THEHUB_TOKEN") + ), + licenses += ("MIT", url("https://opensource.org/license/MIT")), + scmInfo := Some( + ScmInfo( + url("https://github.com/davidon-top/sfs"), + "scm:https://github.com/davidon-top/sfs.git" + ) + ), + organization := "top.davidon.sfs", + organizationName := "DavidOnTop", + organizationHomepage := Some(url("https://davidon.top")) ) -ThisBuild / credentials += Credentials( - "GitHub Package Registry", - "maven.pkg.github.com", - sys.env("THEHUB_USERNAME"), - sys.env("THEHUB_TOKEN") -) - -ThisBuild / licenses += ("MIT", url("https://opensource.org/license/MIT")) - -ThisBuild / scmInfo := Some( - ScmInfo( - url("https://github.com/davidon-top/sfs"), - "scm:https://github.com/davidon-top/sfs.git" - ) -) - -ThisBuild / organization := "top.davidon.sfs" -ThisBuild / organizationName := "DavidOnTop" -ThisBuild / organizationHomepage := Some(url("https://davidon.top")) lazy val generate = taskKey[Unit]("pre compilation codegen task") @@ -34,9 +33,10 @@ generate := DomGenerator.generate() lazy val dom = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .in(file("./dom")) + .settings(publishSettings) .settings( name := "sfs-dom", - version := "0.1.0-alpha", + version := "0.1.0", libraryDependencies ++= Seq( "de.tu-darmstadt.stg" %% "rescala" % "0.35.1" ) @@ -55,8 +55,9 @@ lazy val dom = crossProject(JSPlatform, JVMPlatform) lazy val sfs = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .in(file("./sfs")) + .settings(publishSettings) .settings( name := "sfs", - version := "0.1.0-alpha" + version := "0.1.0" ) .dependsOn(dom) diff --git a/sfs/src/main/scala/top/davidon/sfs/renderers/StringRenderer.scala b/sfs/src/main/scala/top/davidon/sfs/renderers/StringRenderer.scala index 00c286c..eb4bccf 100644 --- a/sfs/src/main/scala/top/davidon/sfs/renderers/StringRenderer.scala +++ b/sfs/src/main/scala/top/davidon/sfs/renderers/StringRenderer.scala @@ -20,7 +20,7 @@ class StringRenderer() extends Renderer[String] { case e: Element[?] => renderElement(e) } - .mkString(" ") + .mkString("") s"<${e.tag.name}$modsStr>$bodyStr${ if e.tag.void then "" else s"" }"