Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ jobs:
run: sbt '++ ${{ matrix.scala }}' docs/tlSite

- name: Publish site
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/series/0.1'
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Build reactive web applications in Scala.js with Cats Effect, FS2, and friends!

```scala
libraryDependencies += "com.armanbilge" %%% "calico" % "0.1.2"
libraryDependencies += "com.armanbilge" %%% "calico" % "0.2.0-M1"
```

Please explore the documentation and examples at https://armanbilge.github.io/calico.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ThisBuild / developers := List(
)

ThisBuild / tlCiReleaseBranches ++= Seq("series/0.1")
ThisBuild / tlSitePublishBranch := Some("series/0.1")
ThisBuild / tlSitePublishBranch := Some("main")
ThisBuild / tlSonatypeUseLegacyHost := false

ThisBuild / crossScalaVersions := Seq("3.2.1")
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ I am very grateful to [@SystemFw](https://github.com/SystemFw/) who gave me a tu
With special thanks to [@yurique](https://github.com/yurique/), you can now try **Calico** right in your browser at [scribble.ninja](https://scribble.ninja/)!

```scala
libraryDependencies += "com.armanbilge" %%% "calico" % "@VERSION@"
libraryDependencies += "com.armanbilge" %%% "calico" % "@PRERELEASE_VERSION@"
```

Please open issues (and PRs!) for anything and everything :)
Expand All @@ -38,7 +38,7 @@ import fs2.dom.*
val component: Resource[IO, HtmlElement[IO]] = ???

// or more generally:
def component[F[_]: Dom]: Resource[F, HTMLElement[F]] = ???
def component[F[_]: Dom]: Resource[F, HtmlElement[F]] = ???
```

This `Resource` completely manages the lifecycle of that element and its children. When the `Resource` is allocated, it will create an instance of the `HtmlElement` and any supporting resources, such as background `Fiber`s or WebSocket connections. In kind, when the `Resource` is closed, these `Fiber`s and connections are canceled and released.
Expand Down
2 changes: 1 addition & 1 deletion router/src/main/scala/calico/router/Router.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ abstract class Router[F[_]] private ():
def dispatch(routes: Routes[F]): Resource[F, fs2.dom.HtmlElement[F]]

/**
* Compile [[Routes]] into a renderable [[dom.HTMLElement]]
* Compile [[Routes]] into a renderable [[fs2.dom.HtmlElement]]
*/
def dispatch(routes: F[Routes[F]]): Resource[F, fs2.dom.HtmlElement[F]] =
Resource.eval(routes).flatMap(dispatch)
Expand Down
2 changes: 1 addition & 1 deletion router/src/main/scala/calico/router/Routes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object Routes:

/**
* Create a [[Routes]] for one "template". The `matcher` [[PartialFunction]] may extract some
* state `A` from the [[Uri]] that is communicated to the [[HTMLElement]] via a [[Signal]].
* state `A` from the [[Uri]] that is communicated to the [[HtmlElement]] via a [[Signal]].
* This enables the component to be re-used when the [[Uri]] changes but the same [[Route]]
* matches although the extracted state may differ.
*/
Expand Down