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

View File

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