Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Commit

Permalink
updated the README to include details on post install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
timjroberts committed Dec 17, 2015
1 parent a82e5e4 commit 99aec94
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,21 @@ If you have a few dependencies that come from custom registries, you can add a `
```
This allows mixed registry sources until `@scope`s are fixed.

## Workspace only install scripts

Sometimes it will be convenient to execute a script in your modules _only_ during the installation of your workspace.
To do this, add a script named `npm-workspace:install` to the module's `package.json`:

```javascript
{
"scripts": {
"npm-workspace:install": "..."
}
}
```
When you execute `npm-workspace install` the script will run after the module has been installed (in the same way that
`install` or `postinstall` scripts are.

## Under the hood

- It finds and parse the links from the nearest `workspace.json` up in the current directory tree.
Expand Down

0 comments on commit 99aec94

Please sign in to comment.