You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disclaimer: I'm new to using clib so apologies if this has been visited in the past and I've missed it.
From what I understand, if you provide "install" in your package.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 with both, specifying no flags, inform user to select one or the other
if you install a package with both, and you specify --binary, you get the "install" path
if you install a package with both, and you specify --src, you get it as a dependency in ./deps
if you install a package with both, and you specify --binaryand--src, then you get both
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 just feels that there's something missing for this use case.
The text was updated successfully, but these errors were encountered:
Disclaimer: I'm new to using
clib
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:--binary
, error--src
, error--binary
, you get the"install"
path--src
, you get it as a dependency in./deps
--binary
and--src
, then you get bothThis 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 just feels that there's something missing for this use case.
The text was updated successfully, but these errors were encountered: