Fix casing in dev server error message.

This commit is contained in:
Dillon Kearns 2022-09-26 16:11:04 -07:00
parent 058adc63f9
commit 0d0edd7030
2 changed files with 8 additions and 6 deletions

View File

@ -40,6 +40,7 @@ import Gen.String
import Gen.Tuple import Gen.Tuple
import Gen.Url import Gen.Url
import Pages.Internal.RoutePattern as RoutePattern exposing (RoutePattern) import Pages.Internal.RoutePattern as RoutePattern exposing (RoutePattern)
import String.Case
type Phase type Phase
@ -1753,13 +1754,13 @@ otherFile routes phaseString =
(\param -> (\param ->
case param of case param of
RoutePattern.StaticParam name -> RoutePattern.StaticParam name ->
name String.Case.toKebabCaseLower name
RoutePattern.DynamicParam name -> RoutePattern.DynamicParam name ->
":" ++ name ":" ++ String.Case.toCamelCaseLower name
RoutePattern.OptionalParam2 name -> RoutePattern.OptionalParam2 name ->
":" ++ name ":" ++ String.Case.toCamelCaseLower name
RoutePattern.OptionalSplatParam2 -> RoutePattern.OptionalSplatParam2 ->
"*" "*"
@ -2201,10 +2202,10 @@ routePatternToExpression route =
(\segment -> (\segment ->
case segment of case segment of
RoutePattern.StaticSegment name -> RoutePattern.StaticSegment name ->
Gen.Pages.Internal.RoutePattern.make_.staticSegment (Elm.string name) Gen.Pages.Internal.RoutePattern.make_.staticSegment (Elm.string (String.Case.toKebabCaseLower name))
RoutePattern.DynamicSegment name -> RoutePattern.DynamicSegment name ->
Gen.Pages.Internal.RoutePattern.make_.dynamicSegment (Elm.string name) Gen.Pages.Internal.RoutePattern.make_.dynamicSegment (Elm.string (String.Case.toCamelCaseLower name))
) )
|> Elm.list |> Elm.list
, ending = , ending =
@ -2213,7 +2214,7 @@ routePatternToExpression route =
(\ending -> (\ending ->
case ending of case ending of
RoutePattern.Optional name -> RoutePattern.Optional name ->
Gen.Pages.Internal.RoutePattern.make_.optional (Elm.string name) Gen.Pages.Internal.RoutePattern.make_.optional (Elm.string (String.Case.toCamelCaseLower name))
RoutePattern.RequiredSplat -> RoutePattern.RequiredSplat ->
Gen.Pages.Internal.RoutePattern.make_.requiredSplat Gen.Pages.Internal.RoutePattern.make_.requiredSplat

View File

@ -16,6 +16,7 @@
"rtfeldman/elm-hex": "1.0.0", "rtfeldman/elm-hex": "1.0.0",
"stil4m/elm-syntax": "7.2.9", "stil4m/elm-syntax": "7.2.9",
"the-sett/elm-pretty-printer": "3.0.0", "the-sett/elm-pretty-printer": "3.0.0",
"the-sett/elm-string-case": "1.0.2",
"the-sett/elm-syntax-dsl": "6.0.2" "the-sett/elm-syntax-dsl": "6.0.2"
}, },
"indirect": { "indirect": {