I have an Elm package (source + all build artifacts) in a local directory, and I would like to use it from another Elm package, without publishing the library. So my directory setup looks like this:
/
my-lib/
elm-package.json
my-app/
elm-package.json
First of all, running elm-package install
in the library package's directory doesn't seem to do anything more than just building the package; it doesn't get installed in any global directory as far as I can tell.
I've added my-lib
to my-app/elm-package.json
as such:
"dependencies": {
"elm-lang/core": "1.0.0 <= v < 2.0.0",
"my-vendor/my-lib": "0.0.1 <= v <= 0.0.1"
}
So when I run elm-make
in the dependent package's directory, it complains
There are no versions of package
my-vendor/my-lib
on your computer.
elm-package install
complains about the same thing.
The only workaround I've found is to create the following symlinks in my-app
:
/
my-app/
elm-stuff/
packages/
my-vendor/
my-lib/
0.0.1@ -> /my-lib/
build-artifacts/
my-vendor@ -> /my-lib/build-artifacts/my-vendor
I also had to add the following to /my-app/elm-stuff/exact-dependencies.json
:
"my-vendor/elm-lib": "0.0.1"
Clearly, all of the above should be taken care of automatically by elm-package
, if only I could point it at /my-lib/
from /my-app/
. So how do I do that?