A warning system for peer dependencies.
peerDependencies may become removed from npm but that doesn't mean modules won't have peer dependencies. Any time a module accepts a plugin a peer dependency has been created. This library will help you warn users when they have not installed a compatible peer dependency.
npm install peerdep --save and then in your module/plugin's
package.json, define your
peerDependencies as normal but include this
peerdep install script:
Now when your plugin has been installed it will run the
peerdep script to check if a compatible version of
grunt@~0.4.1 has been installed. If it has not been installed or an incompatible version has been installed
peerdep will log a warning to the user upon
WARN peerinvalid Peer email@example.com wants grunt@~0.4.1 but found "firstname.lastname@example.org" installed.
The first argument of the
peerdep script is an alternate key if you want to avoid conflicts with the existing
- 0.1.0 - initial release
Copyright (c) 2014 Kyle Robinson Young
Licensed under the MIT license.