Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/team-griffin/install-self-peers
https://github.com/team-griffin/install-self-peers
cli npm peer yarn
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/team-griffin/install-self-peers
- Owner: team-griffin
- License: mit
- Created: 2017-04-11T19:51:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-30T07:38:39.000Z (10 months ago)
- Last Synced: 2024-04-14T05:52:53.634Z (9 months ago)
- Topics: cli, npm, peer, yarn
- Language: JavaScript
- Size: 8.79 KB
- Stars: 28
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```shell
npm i --save-dev @team-griffin/install-self-peersyarn add --dev @team-griffin/install-self-peers
```## Usage
#### Manual
This package creates a bin, which you can execute:
```shell
$ ./node_modules/.bin/install-self-peers
```#### Package.json lifecycle
Add the following script in `package.json` to trigger the cli after installing with dependencies.
```json
{
"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