feat: project seperation
This commit is contained in:
parent
a679aeb978
commit
3e06f86735
24 changed files with 49 additions and 21 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
||||||
shared/src/main/scala/top/davidon/sfs/dom/defs
|
dom/src/main/scala/top/davidon/sfs/dom/defs
|
||||||
target/
|
target/
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2024 David Kozak
|
Copyright (c) 2024 Dávid Kozák
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
51
build.sbt
51
build.sbt
|
@ -1,26 +1,51 @@
|
||||||
ThisBuild / version := "0.1.0"
|
|
||||||
ThisBuild / organization := "top.davidon"
|
|
||||||
|
|
||||||
ThisBuild / scalaVersion := "3.5.0"
|
ThisBuild / scalaVersion := "3.5.0"
|
||||||
|
ThisBuild / publishMavenStyle := true
|
||||||
|
ThisBuild / publishTo := Some(
|
||||||
|
"GitHub Package Registry" at "https://maven.pkg.github.com/davidon-top/sfs"
|
||||||
|
)
|
||||||
|
ThisBuild / credentials += Credentials(
|
||||||
|
"GitHub Package Registry",
|
||||||
|
"maven.pkg.github.com",
|
||||||
|
sys.env("THEHUB_USERNAME"),
|
||||||
|
sys.env("THEHUB_TOKEN")
|
||||||
|
)
|
||||||
|
ThisBuild / versionScheme := Some("early-semver")
|
||||||
|
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 precompile = taskKey[Unit]("pre compilation tasks")
|
lazy val generate = taskKey[Unit]("pre compilation codegen task")
|
||||||
|
|
||||||
precompile := DomGenerator.generate()
|
generate := DomGenerator.generate()
|
||||||
|
|
||||||
(Compile / compile) := ((Compile / compile) dependsOn precompile).value
|
(Compile / compile) := ((Compile / compile) dependsOn generate).value
|
||||||
|
|
||||||
lazy val root = crossProject(JSPlatform, JVMPlatform)
|
lazy val root = crossProject(JSPlatform, JVMPlatform)
|
||||||
.crossType(CrossType.Full)
|
.crossType(CrossType.Pure)
|
||||||
.in(file("."))
|
.in(file("./dom"))
|
||||||
.settings(
|
.settings(
|
||||||
name := "sfs",
|
name := "sfs-dom",
|
||||||
libraryDependencies ++= Seq(
|
version := "0.1.0-SNAPSHOT"
|
||||||
"de.tu-darmstadt.stg" %%% "reactives" % "0.36.0",
|
|
||||||
"org.scala-js" % "scalajs-dom" % "2.8.0" % "sjs1_3"
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
// .settings(
|
||||||
|
// libraryDependencies ++= Seq(
|
||||||
|
// "org.scala-js" % "scalajs-dom" % "2.8.0" % "sjs1_3"
|
||||||
|
// )
|
||||||
|
// )
|
||||||
.jvmSettings(
|
.jvmSettings(
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"org.scala-js" % "scalajs-dom_sjs1_3" % "2.8.0"
|
"org.scala-js" % "scalajs-dom_sjs1_3" % "2.8.0"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
.jsSettings(
|
||||||
|
libraryDependencies ++= Seq(
|
||||||
|
"org.scala-js" % "scalajs-dom_sjs1_3" % "2.8.0"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package top.davidon.sfs.dom
|
package top.davidon.sfs.dom
|
||||||
|
|
||||||
import top.davidon.sfs.dom.keys.Key
|
|
||||||
import top.davidon.sfs.dom.Value
|
import top.davidon.sfs.dom.Value
|
||||||
|
import top.davidon.sfs.dom.keys.Key
|
||||||
|
|
||||||
class Modifier[F, T](val key: Key, val value: Value[F, T]) {}
|
class Modifier[F, T](val key: Key, val value: Value[F, T]) {}
|
|
@ -347,13 +347,15 @@ object DomGenerator {
|
||||||
|
|
||||||
private object generator
|
private object generator
|
||||||
extends CanonicalGenerator(
|
extends CanonicalGenerator(
|
||||||
baseOutputDirectoryPath = "shared/src/main/scala/top/davidon/sfs/dom",
|
baseOutputDirectoryPath = "dom/src/main/scala/top/davidon/sfs/dom",
|
||||||
basePackagePath = "top.davidon.sfs.dom",
|
basePackagePath = "top.davidon.sfs.dom",
|
||||||
standardTraitCommentLines = List(
|
standardTraitCommentLines = List(
|
||||||
"#NOTE: GENERATED CODE",
|
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
|
||||||
s" - This file is generated at compile time from the data in Scala DOM Types",
|
"!!! THIS IS GENERATED CODE !!!",
|
||||||
" - See `project/DomDefsGenerator.scala` for code generation params",
|
"!!! DO NOT EDIT DIRECTLY !!!",
|
||||||
" - Contribute to https://github.com/raquo/scala-dom-types to add missing tags / attrs / props / etc."
|
"!!! DO NOT COMMIT !!!",
|
||||||
|
"!!! SEE ./project/DomGenerator !!!",
|
||||||
|
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||||
),
|
),
|
||||||
format = CodeFormatting()
|
format = CodeFormatting()
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
|
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
|
||||||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
|
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
|
||||||
|
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue