Skip to content

Commit

Permalink
Fixed #243: Renamed TyrianApp to TyrianZ/IOApp
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Jan 2, 2024
1 parent ed11b11 commit 6b03cb5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sandbox-zio/src/main/scala/example/SandboxZIO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import zio.interop.catz.*
import scala.scalajs.js.annotation.*

@JSExportTopLevel("TyrianApp")
object SandboxZIO extends TyrianApp[Msg, Model]:
object SandboxZIO extends TyrianZIOApp[Msg, Model]:

def router: Location => Msg = Routing.externalOnly(Msg.NoOp, Msg.FollowLink(_))

Expand Down
2 changes: 1 addition & 1 deletion sandbox/src/main/scala/example/Sandbox.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import scala.util.Random
import scalajs.js

@JSExportTopLevel("TyrianApp")
object Sandbox extends TyrianApp[Msg, Model]:
object Sandbox extends TyrianIOApp[Msg, Model]:

// Here we just do a simple string match, but this could be a route matching
// lib like: https://github.com/sherpal/url-dsl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import cats.effect.unsafe.implicits.global
/** The TyrianApp trait can be extended to conveniently prompt you for all the methods needed for a Tyrian app, as well
* as providing a number of standard app launching methods.
*/
trait TyrianApp[Msg, Model] extends TyrianAppF[IO, Msg, Model]:
trait TyrianIOApp[Msg, Model] extends TyrianAppF[IO, Msg, Model]:

val run: IO[Nothing] => Unit = _.unsafeRunAndForget()

object TyrianApp:
object TyrianIOApp:
def onLoad(appDirectory: (String, TyrianAppF[IO, _, _])*): Unit =
TyrianAppF.onLoad(appDirectory: _*)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import scala.annotation.nowarn
/** The TyrianApp trait can be extended to conveniently prompt you for all the methods needed for a Tyrian app, as well
* as providing a number of standard app launching methods.
*/
trait TyrianApp[Msg, Model](using Async[Task]) extends TyrianAppF[Task, Msg, Model]:
trait TyrianZIOApp[Msg, Model](using Async[Task]) extends TyrianAppF[Task, Msg, Model]:

private val runtime = Runtime.default

Expand All @@ -20,7 +20,7 @@ trait TyrianApp[Msg, Model](using Async[Task]) extends TyrianAppF[Task, Msg, Mod
runtime.unsafe.fork(runnable)
}

object TyrianApp:
object TyrianZIOApp:
def onLoad(appDirectory: (String, TyrianAppF[Task, _, _])*)(using Async[Task]): Unit =
TyrianAppF.onLoad(appDirectory: _*)

Expand Down

0 comments on commit 6b03cb5

Please sign in to comment.