package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0

doc/b0.kit/B0_show_url/index.html

Module B0_show_urlSource

Action and unit execution to show URLs after builds.

This module provides the .show-url action which allows to reload URLs in your browser when you build static websites or web servers.

URLs

Sourcetype url = [
  1. | `Url of B0_url.t
    (*

    The URL.

    *)
  2. | `In of B0_env.dir * B0_std.Fpath.t
    (*

    The path in given directory.

    *)
  3. | `Fun of string * (B0_env.t -> B0_unit.t -> (B0_url.t, string) result)
]

The type for dermining the URL to show.

url defines the default URL to show when .show-url is used on a unit without specifying a path.

Sourceval get_url : B0_env.t -> B0_unit.t -> (B0_url.t, string) result

get_url env u performs the logic to get the url for unit u in environment env.

Server keys

Sourceval listen_args : (authority:string -> B0_std.Cmd.t) B0_meta.key

listen_args defines the arguments to specify for how to make the server listen on authority for connections. These arguments are added at the end of the server tool invocation or before a -- token if there is one.

Sourceval timeout_s : int B0_meta.key

timeout_s defines the maximal number of seconds to wait for the server to be connectable before reloading the URL. Defaults to 1s.

Unit action

action is a unit action that invokes the show-url tool on the unit's url. If no command line arguments are specified on invocation --prefix is added.

.show-url unit

Sourceval unit : B0_unit.t

unit is the .show-url unit.

See b0 -- .show-url --help for more information.