@allya/npm-install-peers

CLI command to install npm peerDependencies

Usage no npm install needed!

<script type="module">
  import allyaNpmInstallPeers from 'https://cdn.skypack.dev/@allya/npm-install-peers';
</script>

README

NPM Install Peers

Software License npm

CLI command to install npm peerDependencies. This can be useful when developing modules.

Consider the following dependencies:

{
    "dependencies": {
        "react-router": "4.2.0"
    },
    "devDependencies": {},
    "peerDependencies": {
        "moment": "2.21.0"
    },
}

If you run this npm-install-peers command, moment will be installed because it's a direct peer dependency of your project. You'll still get a warning that react-router is missing a react peer dependency. You'll still need to install react yourself, this command only installs direct peer dependencies.

You probably don't need this package! It's generally a better idea to have your peerDependencies contents as devDependencies too.

Postcardware

You're free to use this package (it's MIT-licensed), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.

The best postcards will get published on the open source page on our website.

Installation

npm install -g npm-install-peers

Usage

npm-install-peers

This will read out your package.json file and install all of its peerDependencies. There are no other options.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.

Credits

About Spatie

Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.

License

The MIT License (MIT). Please see License File for more information.