Custom Source Directory
See original GitHub issueI’ve managed to get elm-git-install to install a component library from Gitlab. However, it expects it to be in root/src. The idea was this Elm UI component library we’re building would live in a monorepo with other tech stacks like React, documentation, etc. so it’d be in a sub-directory. I’ve briefly glanced at the elm-git-install source code, and it appears y’all were thinking along the same lines:
const depSources = ['src']; // Can packages have source directories?
If you look at how it installs it, it puts your repo + “/src” at the end. Before I go attempting to make a PR, I just want to make sure I have the right idea here. It appears I’d need to modify populateSources
to look at opts
to see if there are any custom options, and instead of hardcoding /src
it’d be like opts.path + '/src'
or something like that.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top GitHub Comments
elm-git-install
only downloads the relevant code. The code is still compiled by the elm compiler. Also, any time the elm compiler performs modifications (like adding a package) it strips away unsupported properties.In think the way this would have to be implemented, is that
elm-git.json
is altered so that instead of just being an object ofgitUrl -> version
, it also works withgitUrl -> { path: customPath, version: version }
.This is not an ideal situation, though, as you’d have to specify it per project, but I think that’s the best we can do.