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/
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
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
|
||||
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 / 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)
|
||||
.crossType(CrossType.Full)
|
||||
.in(file("."))
|
||||
.crossType(CrossType.Pure)
|
||||
.in(file("./dom"))
|
||||
.settings(
|
||||
name := "sfs",
|
||||
libraryDependencies ++= Seq(
|
||||
"de.tu-darmstadt.stg" %%% "reactives" % "0.36.0",
|
||||
"org.scala-js" % "scalajs-dom" % "2.8.0" % "sjs1_3"
|
||||
)
|
||||
name := "sfs-dom",
|
||||
version := "0.1.0-SNAPSHOT"
|
||||
)
|
||||
// .settings(
|
||||
// libraryDependencies ++= Seq(
|
||||
// "org.scala-js" % "scalajs-dom" % "2.8.0" % "sjs1_3"
|
||||
// )
|
||||
// )
|
||||
.jvmSettings(
|
||||
libraryDependencies ++= Seq(
|
||||
"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
|
||||
|
||||
import top.davidon.sfs.dom.keys.Key
|
||||
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]) {}
|
|
@ -347,13 +347,15 @@ object DomGenerator {
|
|||
|
||||
private object generator
|
||||
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",
|
||||
standardTraitCommentLines = List(
|
||||
"#NOTE: GENERATED CODE",
|
||||
s" - This file is generated at compile time from the data in Scala DOM Types",
|
||||
" - See `project/DomDefsGenerator.scala` for code generation params",
|
||||
" - Contribute to https://github.com/raquo/scala-dom-types to add missing tags / attrs / props / etc."
|
||||
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
|
||||
"!!! THIS IS GENERATED CODE !!!",
|
||||
"!!! DO NOT EDIT DIRECTLY !!!",
|
||||
"!!! DO NOT COMMIT !!!",
|
||||
"!!! SEE ./project/DomGenerator !!!",
|
||||
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
),
|
||||
format = CodeFormatting()
|
||||
) {
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
|
||||
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