giolt_sdk/dev

Types

pub type Change {
  Change(path: String, kind: ChangeKind)
}

Constructors

pub type ChangeKind {
  Created
  Modified
  Deleted
}

Constructors

  • Created
  • Modified
  • Deleted
pub opaque type Config(has_watch, has_build)
pub type HasBuild
pub type HasWatch
pub type NoBuild
pub type NoWatch

Values

pub fn build(
  config: Config(has_watch, has_build),
  action: fn(Change) -> Result(Nil, String),
) -> Config(has_watch, HasBuild)
pub fn change_kind(raw: String) -> ChangeKind
pub const initial_change: Change
pub fn live_reload(
  config: Config(has_watch, has_build),
  enabled: Bool,
) -> Config(has_watch, has_build)
pub fn new() -> Config(NoWatch, NoBuild)
pub fn prebuild(
  config: Config(has_watch, has_build),
  action: fn() -> Result(Nil, String),
) -> Config(has_watch, has_build)
pub fn run(
  config: Config(HasWatch, HasBuild),
) -> promise.Promise(Nil)
pub fn serve(
  config: Config(has_watch, has_build),
  port port: Int,
) -> Config(has_watch, has_build)
pub fn static_dir(
  config: Config(has_watch, has_build),
  path: String,
) -> Config(has_watch, has_build)
pub fn watch(
  config: Config(has_watch, has_build),
  path: String,
) -> Config(HasWatch, has_build)
pub fn worker(
  config: Config(has_watch, has_build),
  path: String,
) -> Config(has_watch, has_build)
Search Document