Closed abradley2 closed 1 year ago
Hello!
So, the starting code created by elm-codegen init
no longer contains helpers.
As well, I just put out a new release which supports --cwd
to the install and run commands, which should help people manage where things live a bit more precisely.
Thanks for the well-written issue!
Elm Language Server will have the following complaint when it runs in a project that
elm-codegen init
has createdBecause the root source directory is
.
when it sees/helpers/SomeFile.elm
it thinks that the module is named incorrectly- it doesn't quite have the knowledge to realize that this is essentially a template file.The easy temporary fix would be to just add it as a source-directory in the root
elm-json
to quiet it. But then this manifests as a new error because now we have nested source directories.my workaround for the time being has been this fork that moves the
.
src directory to a nestedcodegen-src
instead, and addshelpers
tosource-directories
as well.This doesn't actually stop anything for working, but creates a bit of a headache when using Elm Language Server. I can make a PR for this if it is of any interest?