-
Notifications
You must be signed in to change notification settings - Fork 121
Dependencies vs subdependencies #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As I've been exploring importmap-rails usage more, I've been testing this simple solution:
Basically, just indent sub-dependencies inside the dependency. Simple. However, this goes against Rubocop conventions, so I had to add It also breaks lines like this and this which depend on But the most important downside to this is that it means I have to manually manage the indentation, which works if I have a small number of packages, but for a lot it would get messy. I would love to see sub-dependencies either abstracted somehow so they're not shown at all inside |
@dhh can you explain why you marked this as complete? I don't see any recent commits adding this functionality, but maybe I missed something. |
Should have included a comment. This is beyond the scope of what importmap can/should offer in my opinion. We are not a full-featured package manager. Multiple packages can share the same root dependencies, and we don't have any way of representing that with this setup. |
Looping back here to mention that I created a gem to add this functionality: https://github.com/quimbee/importmap-package-manager It lets you separate your library imports into a separate |
I'm just starting to use importmap-rails now. I noticed when I run
importmap pin xyz
, ifxyz
has sub-dependencies, they get pinned too.When I'm looking at my
config/importmap.rb
file, how do I distinguish what is one of my direct dependencies, vs what is a subdependency?Also, what happens if two of my dependencies require different version of the same sub-dependency? Is that up to me to manage?
The text was updated successfully, but these errors were encountered: