Automatically run npm install on git pull if the package.json was changed
https://www.npmjs.com/package/git-pull-run โ// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Health 97/100 with only 18 stars
// how to help
// readme
Run Commands on Changes after Git Pull
Automatically run commands like npm install when fetching changes from git, but only if certain files have changed.
How It Works
Git invokes the post-merge hook after a git pull was done a local repository. This package will then run git diff-tree to get a list of changed files. Each changed file is being matched against the specified pattern and in case of a match, the specified command or script will be executed.
For more information, please refer to my post: Automatically Install NPM Dependencies on Git Pull
Install
npm install --save-dev git-pull-run
This package should be executed as a post-merge git hook.