Open r-k-b opened 1 year ago
For example, this file:
module BadModuleNamedWith exposing (dummyDecoder) import Json.Decode as JD dummyDecoder : JD.Decoder String dummyDecoder = JD.succeed ""
would produce Gen code containing:
{-| dummyDecoder: JD.Decoder String -} dummyDecoder : Elm.Expression dummyDecoder = Elm.value { importFrom = [ "BadModuleNamedWith" ] , name = "dummyDecoder" , annotation = Just (Type.namedWith [ "JD" ] "Decoder" [ Type.string ]) }
which would then produce generated code that contains import JD instead of import Json.Decode.
import JD
import Json.Decode
I've added a test case to demonstrate: 3e7c05574c315658e77ddae4948c96b3386b4817
Thanks for creating elm-codegen, it's fantastic! :pray:
For example, this file:
would produce Gen code containing:
which would then produce generated code that contains
import JD
instead ofimport Json.Decode
.I've added a test case to demonstrate: 3e7c05574c315658e77ddae4948c96b3386b4817
Thanks for creating elm-codegen, it's fantastic! :pray: