Skip to content

Commit

Permalink
Merge pull request #259 from dillonkearns/page-builder-refinements
Browse files Browse the repository at this point in the history
Refine Page Builder API
  • Loading branch information
dillonkearns authored Dec 11, 2021
2 parents 43a6399 + 4465252 commit fd04b17
Show file tree
Hide file tree
Showing 33 changed files with 337 additions and 255 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
# Re-use node_modules between runs until package-lock.json changes.
- name: Cache node_modules
id: cache-node_modules
Expand Down Expand Up @@ -105,10 +105,10 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
# Re-use node_modules between runs until package-lock.json changes.
- name: Cache node_modules
id: cache-node_modules
Expand Down
4 changes: 2 additions & 2 deletions examples/base-path/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/base-path/src/Page/Index.elm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand Down
2 changes: 1 addition & 1 deletion examples/base-path/src/Page/SubPage.elm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand Down
8 changes: 5 additions & 3 deletions examples/docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/docs/src/Page/Blog.elm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type alias RouteParams =


type alias Model =
()
{}


view :
Expand Down
8 changes: 4 additions & 4 deletions examples/docs/src/Page/Blog/Slug_.elm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand All @@ -41,13 +41,13 @@ page =
Page.prerender
{ data = data
, head = head
, routes = routes
, pages = pages
}
|> Page.buildNoState { view = view }


routes : DataSource.DataSource (List RouteParams)
routes =
pages : DataSource.DataSource (List RouteParams)
pages =
Article.blogPostsGlob
|> DataSource.map
(List.map
Expand Down
8 changes: 4 additions & 4 deletions examples/docs/src/Page/Docs/Section__.elm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand All @@ -45,16 +45,16 @@ page : Page RouteParams Data
page =
Page.prerender
{ head = head
, routes = routes
, pages = pages
, data = data
}
|> Page.buildNoState
{ view = view
}


routes : DataSource (List RouteParams)
routes =
pages : DataSource (List RouteParams)
pages =
DocsSection.all
|> DataSource.map
(List.map
Expand Down
8 changes: 4 additions & 4 deletions examples/docs/src/Page/Index.elm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import View.CodeTab as CodeTab


type alias Model =
()
{}


type alias Msg =
Expand Down Expand Up @@ -145,13 +145,13 @@ page : Page RouteParams Data
page =
Page.prerender
{ head = head
, routes = routes
, pages = pages
, data = data
}
|> Page.buildNoState { view = view }
routes : DataSource (List RouteParams)
routes =
pages : DataSource (List RouteParams)
pages =
DataSource.succeed [ { name = "elm-pages" } ]
data : RouteParams -> DataSource Data
Expand Down
4 changes: 2 additions & 2 deletions examples/docs/src/Page/Showcase.elm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand All @@ -29,7 +29,7 @@ type alias RouteParams =
{}


page : PageWithState RouteParams Data () Msg
page : PageWithState RouteParams Data Model Msg
page =
Page.single
{ head = head
Expand Down
24 changes: 13 additions & 11 deletions examples/end-to-end/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/end-to-end/src/Page/FileData.elm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand Down
2 changes: 1 addition & 1 deletion examples/end-to-end/src/Page/Index.elm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand Down
2 changes: 1 addition & 1 deletion examples/end-to-end/src/Page/Links.elm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand Down
4 changes: 2 additions & 2 deletions examples/escaping/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/escaping/src/Page/Escaping.elm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand Down
2 changes: 1 addition & 1 deletion examples/escaping/src/Page/Index.elm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import View exposing (View)


type alias Model =
()
{}


type alias Msg =
Expand Down
6 changes: 3 additions & 3 deletions examples/pokedex/src/Page/PokedexNumber_.elm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ page : Page RouteParams Data
page =
Page.prerenderWithFallback
{ head = head
, routes = routes
, pages = pages
, data = data
, handleFallback =
\{ pokedexNumber } ->
Expand All @@ -47,8 +47,8 @@ page =
|> Page.buildNoState { view = view }


routes : DataSource (List RouteParams)
routes =
pages : DataSource (List RouteParams)
pages =
DataSource.succeed []


Expand Down
4 changes: 2 additions & 2 deletions examples/routing/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fd04b17

Please sign in to comment.