Skip to content

Commit

Permalink
Final fixies for 0.19 on routing and add official elm-return
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeriochaves committed Sep 3, 2018
1 parent 1540abb commit 39ea475
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 351 deletions.
2 changes: 2 additions & 0 deletions boilerplate/elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"elm-version": "0.19.0",
"dependencies": {
"direct": {
"Fresheyeball/elm-return": "7.0.0",
"elm/browser": "1.0.0",
"elm/core": "1.0.0",
"elm/html": "1.0.0",
Expand All @@ -18,6 +19,7 @@
"indirect": {
"Skinney/murmur3": "2.0.7",
"elm/regex": "1.0.0",
"elm/time": "1.0.0",
"elm/virtual-dom": "1.0.0"
}
},
Expand Down
4 changes: 2 additions & 2 deletions boilerplate/src/Cats/Update.elm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module Cats.Update exposing (..)
module Cats.Update exposing (init, update)

import Cats.Data exposing (..)
import Cats.Types exposing (..)
import Helpers.Return exposing (Return, return)
import RemoteData exposing (..)
import Return exposing (Return, return)
import Types


Expand Down
4 changes: 2 additions & 2 deletions boilerplate/src/Counter/Update.elm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Counter.Update exposing (..)
module Counter.Update exposing (init, update)

import Counter.Types exposing (..)
import Helpers.Return exposing (Return, return)
import RemoteData exposing (..)
import Return exposing (Return, return)
import Types


Expand Down
47 changes: 0 additions & 47 deletions boilerplate/src/Helpers/Respond.elm

This file was deleted.

275 changes: 0 additions & 275 deletions boilerplate/src/Helpers/Return.elm

This file was deleted.

7 changes: 4 additions & 3 deletions boilerplate/src/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import View exposing (view)

main : Program () Model Msg
main =
Browser.fullscreen
Browser.application
{ init = init
, update = update
, view = view
, onNavigation = Just (MsgForRouter << Router.Types.OnNavigation)
, update = update
, subscriptions = always Sub.none
, onUrlChange = MsgForRouter << Router.Types.OnUrlChange
, onUrlRequest = MsgForRouter << Router.Types.OnUrlRequest
}
11 changes: 8 additions & 3 deletions boilerplate/src/Router/Types.elm
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
module Router.Types exposing (..)
module Router.Types exposing (Model, Msg(..))

import Browser exposing (UrlRequest)
import Browser.Navigation exposing (Key)
import Router.Routes exposing (..)
import Url exposing (Url)


type alias Model =
Page
{ page : Page
, key : Key
}


type Msg
= OnNavigation Url
= OnUrlChange Url
| OnUrlRequest UrlRequest
| Go Page
Loading

0 comments on commit 39ea475

Please sign in to comment.