Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/clibPublic

Support src/install in the same project configuration #129

Open
@whitfin

Description

@whitfin

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--binaryand--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

No one assigned

    Type

    No type

    Projects

    • Status

      To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp