This module contains several functions useful in elm-codegen projects that allow you to generate type-safe code for use with ChristophP/elm-18next. The documentation in this project's README is likely more useful for consuming this module, so start there.
files : Flags -> List Elm.File
Using the decoded flags (from flagsDecoder
), this function will generate a list of Elm.File
's
to be used in your main Generate.elm
function for elm-codegen.
flagsDecoder : Json.Decode.Decoder Flags
A decoder that consumes a JSON object that conforms to the I18Next v2 specification. This is just a simple object with string keys and string values, that may contain nested objects. The delimiter to replacement placeholders must be the "double curly" format {{like so}}.
The opaque type for parsed Flags from flagsDecoder
that will be needed to generate the resulting code