Skip to content

Commit

Permalink
docs (#122)
Browse files Browse the repository at this point in the history
* Add site docs

* Site doc
  • Loading branch information
cheleb authored Nov 25, 2023
1 parent d7c0638 commit 3645ac4
Show file tree
Hide file tree
Showing 10 changed files with 9,987 additions and 2,519 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ jobs:
# run: sbt client/fastLinkJS
- name: Vite build
run: |
cd examples/client
pushd examples/client
npm run build
popd
sbt makeSite
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload dist repository
path: "./examples/client/dist"
path: "target/site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"label": "npmInstall",
"type": "shell",
"command": "cd examples/client; npm i",
"command": "pushd examples/client; npm i; popd; NODE_OPTIONS='--openssl-legacy-provider' DEV=1 sbt \"client/fastLinkJS\"",
"presentation": {
"panel": "dedicated",
"group": "runDevCmd",
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ Client code is in [example/client](./example/client/src/main/scala/HelloWorld.sc

### Development


Insure [dev mode](example/client/package.json#L5) is on `fastLinkJS` and not `fullLinkJS` (production mode)

* VSCode with metals

Just open the project with vscode and enjoy [the magic](.vscode/tasks.json)
Expand Down
35 changes: 35 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
import java.nio.charset.StandardCharsets
import org.scalajs.linker.interface.ModuleSplitStyle

lazy val currentYear: String =
java.util.Calendar.getInstance().get(java.util.Calendar.YEAR).toString

val scala33 = "3.3.1"

inThisBuild(
Expand Down Expand Up @@ -219,3 +222,35 @@ Global / onLoad := {

(Global / onLoad).value
}
enablePlugins(
SiteScaladocPlugin,
SitePreviewPlugin,
ScalaUnidocPlugin,
GhpagesPlugin
)

ScalaUnidoc / siteSubdirName := ""
addMappingsToSiteDir(
ScalaUnidoc / packageDoc / mappings,
ScalaUnidoc / siteSubdirName
)
git.remoteRepo := "[email protected]:cheleb/laminar-form-derivation.git"
ghpagesNoJekyll := true
Compile / doc / scalacOptions ++= Seq(
"-siteroot",
"docs",
"-project",
"Laminar Form Derivation",
"-groups",
"-project-version",
version.value,
"-revision",
version.value,
"-default-templates",
"static-site-main",
"-project-footer",
s"Copyright (c) 2022-$currentYear, Olivier NOUGUIER",
"-Ygenerate-inkuire",
"-skip-by-regex:demo\\..*",
"-skip-by-regex:samples\\..*"
)
1 change: 1 addition & 0 deletions docs/_assets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
laminar-form-derivation/
11 changes: 11 additions & 0 deletions docs/_docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
layout: main
---

<h1>Laminar Form Derivation</h1>

<p>
Laminar Form Derivation is a library that allows you to derive a form from a case class.
</p>

<span onclick='window.open("/laminar-form-derivation/index.html", "_blank")'> 🚀 Demo</span>
11 changes: 11 additions & 0 deletions docs/_layouts/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html>

<head>
<title>Hello, world!</title>
</head>

<body>
{{ content }}
</body>

</html>
Loading

0 comments on commit 3645ac4

Please sign in to comment.