ryannhg/elm-spa/1.0.0

NOTE: the latest version is 6.0.0

Renamed to ryan-haskell/elm-spa. It is published under that name, and new versions come out there.

Versions published as ryannhg/elm-spa still install under that name. 13 versions of 13 come from the new location (see their notes).

Rerouted (fork, verified). The original repository is gone. This copy comes from a fork that still has the tag. The Lamdera package server serves a copy recovered from https://github.com/tuohy/elm-spa (a fork).

What we checked: Rebuilt with git archive from commit 292236b2582f of https://github.com/tuohy/elm-spa (a fork) (zip prefix ryannhg-elm-spa-8ee73bf/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 597d34671fca0206517a1cd488d425f4f335b10f.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/ryannhg/elm-spa/zipball/1.0.0/

Application.Route

Routing

The cli tool is able to generate routes based on the folder structure and files in the src/Pages folder.

If you're choosing to type out the routes manually, these are just convenience functions for creating Url.Parser types for your application.

type alias Route route =
Parser (route -> route) route

Literally just a Url.Parser under the hood.

index : (() -> route) -> Route route

A top level route. Usually generated by an Index.elm file.

Route.index Index
path : String -> (() -> route) -> Route route

A route for a path like. These are generated by other file names.

Route.path "about-us" AboutUs
slug : (String -> route) -> Route route

A dynamic route, that passes the String value. Usually generated by an Slug.elm file.

Route.slug Slug
folder : String -> (a -> route) -> List (Route a) -> Route route

A route for nested routes, generated by a folder.

Route.folder "settings" Settings Settings.routes