- Notifications
You must be signed in to change notification settings - Fork252
Description
Disclaimer: I'm new to usingclib
so apologies if this has been visited in the past and I've missed it.
From what I understand, if you provide"install"
in yourpackage.json
, your project isn't pulled as a dependency. I used to think that this makes sense, however I'm starting to think that having both should be an option. For example, there might be a library which provides some specific functionality, but the author also wishes to provide a command line wrapper so you can choose whether you want to integrate the lib into your projects, or just use the executable.
I don't think that's too far out there (in fact I hit this recently, which is why I'm here :)). The main issue is that you cannot have separate packages from the same repo (unless I'm missing something). You could always make a new repo to bind the command line tool using the library version as a dependency but it seems... wasteful?
So; how about something like having--src
and--binary
as flags for install, meaning:
- if you install a package with only src, and you specify
--binary
, error - if you install a package with only binary, and you specify
--src
, error - if you install a package with only src, specifying no flags, current behaviour
- if you install a package with only binary, specifying no flags, current behaviour
- if you install a package withboth, specifying no flags, inform user to select one or the other
- if you install a package withboth, and you specify
--binary
, you get the"install"
path - if you install a package withboth, and you specify
--src
, you get it as a dependency in./deps
- if you install a package withboth, and you specify
--binary
and--src
, then you getboth
This would allow distribution of a library alongside an example executable without having to have two packages set up.
Thoughts? Again, sorry if I'm bringing up something already decided... it justfeels that there's something missing for this use case.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To do