You can clone with
HTTPS or Subversion.
It would be useful to have a way of specifying something equivalent to peerDependencies but where they are optional. As discussed in #1400
That would be very useful for projects like a CMS.
@domenic any tips on where / how to implement this feature ?
I saw issues regarding peer dependencies, optional, bundled, dev, optional peer, optional dev, not to mention exotic stuff binDependencies, did I miss something?
Guys, what about declaring those properties as flags? We can use syntax like that:
It would really reduce this keyword clutter.
Sounds nice. Maybe something like this would be even more flexible and future proof:
type: "peer | dev | bin | etc.",
Sadly bin dependencies are not nearly as useful as you'd think. You can't tell whether someone is going to use a module as a binary at install time.
I don't think we should change the syntax like that. It makes things very verbose and what we have works pretty well in practice. It should probably be a separate issue for discussing this though.
@donaldpipowitch Better array:
type: [ 'peer', 'dev' ],
Yes, indeed. This should just be pseudo code. An array would be better :)
yes, npm would really benefit from allowing this
To all who are still interested in optional peer dependencies, I've released a solution to this at https://github.com/Wizcorp/codependency . In a nutshell, it allows for a "optionalPeerDependencies" field in package.json for middleware.
I hope it can help middleware development, and I would love to get any feedback you may wish to share. Thanks!
PS: If you're still interested, I wrote a tumblr post about this.
@othiym23 is this something that will be integrated?
@fixe It's not something that's on the development team's radar, so probably not anytime soon.
would like this as well