0.6.2 • Published 2 months ago

yarnhook v0.6.2

Weekly downloads
29,829
License
MIT
Repository
github
Last release
2 months ago

yarnhook npm version

yarnhook

yarnhook keeps your node_modules up-to-date when your yarn.lock, package-lock.json or shrinkwrap.yaml changes due to git operations like checkout, merge, rebase, pull etc.

Installation

This package should be used with husky.

yarn add --dev yarnhook husky
# or
npm install --save-dev yarnhook husky
# or
pnpm install --save-dev yarnhook husky

Usage

You should let yarnhook handle git hooks that change the dependencies. Example package.json is as follows:

{
  "husky": {
    "hooks": {
      "post-checkout": "yarnhook",
      "post-merge": "yarnhook",
      "post-rewrite": "yarnhook"
    }
  },
}

Flags

Prepend these flags to your git command to use them.

  • YARNHOOK_BYPASS: Run git command bypassing yarnhook completely
  • YARNHOOK_DEBUG: Print debug information
  • YARNHOOK_DRYRUN: Don't install dependencies, only notify

An example:

YARNHOOK_BYPASS=true git checkout feature-branch

Artwork

Project logo: @anilkilic

Font: PT Sans

0.6.2

2 months ago

0.6.1

5 months ago

0.5.3

2 years ago

0.6.0

2 years ago

0.5.2-0

3 years ago

0.5.0-0

3 years ago

0.5.1

3 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago