Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 890 Bytes

README.md

File metadata and controls

40 lines (24 loc) · 890 Bytes

yarn-plugin-after-install

This is a Yarn v4 plugin that adds support for an afterInstall hook that runs after every yarn install, regardless of whether dependencies have changed.

For Yarn v3 support, install v0.5.0 or earlier.

Inspired by https://github.com/GravitywellUK/yarn-plugin-postinstall.

Install

yarn plugin import https://raw.githubusercontent.com/mhassan1/yarn-plugin-after-install/v0.6.0/bundles/@yarnpkg/plugin-after-install.js

Usage

  1. Add an afterInstall hook in .yarnrc.yml:
# .yarnrc.yml

afterInstall: do-something-awesome

The script will run relative to the project directory (containing .yarnrc.yml).

  1. Run yarn.

Testing

yarn test

NOTE: Integration tests require yarn build first.

Publishing

npm version <version>

License

MIT