Skip to content

team-griffin/install-self-peers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

install-self-peers

A cli utility to automatically install the peer dependencies of the package you are developing. This is useful for if you are developing a library and some of your dependencies are actually peers.

For example building react based libs.

npm i --save-dev @team-griffin/install-self-peers

yarn add --dev @team-griffin/install-self-peers

Usage

Manual

This package creates a bin, which you can execute:

$ ./node_modules/.bin/install-self-peers

Package.json lifecycle

Add the following script in package.json to trigger the cli after installing with dependencies.

{
  "scripts": {
    "prepare": "install-self-peers -- --ignore-scripts"
  }
}

It isn't recommended to use the postinstall event, because it is run when installing this package in other apps/libraries.

Arguments

--npm (defaults: false) - This will generate an npm command rather than yarn

--no-execute - Will print to stdout instead of executing the command

Other args can be passed directly to yarn/npm by using --:
install-self-peers -- --ignore-scripts

License

MIT License

Copyright (c) 2017

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •