Fablebook.Router (fablebook v0.1.0)

Copy Markdown View Source

Mounts Fablebook in a Phoenix router.

Mount it inside the dev_routes block that phx.new generates, so it is never reachable in a prod build:

if Application.compile_env(:my_app, :dev_routes) do
  import Fablebook.Router

  scope "/dev" do
    pipe_through :browser

    fablebook "/fablebook", MyAppWeb.Storybook
  end
end

A mount that a prod build can reach fails to compile.

Summary

Functions

Mounts the workbench for book at path.

Functions

fablebook(path, book)

(macro)

Mounts the workbench for book at path.