1.1.19 • Published 6 years ago

git-checkout.js v1.1.19

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

git-checkout.js

Imagine you have two branches with different dependency versions. Every time you checkout the other branch you have to execute npm install again. This package automates that. It compares both packages.json files before and after the checkout and if there is a difference it removes the node_modules directory and installs the dependencies.

One particular use case would be upgrading one of your heavy dependencies like express inside a dedicated branch. To continue your work on other branches, you need the old express dependency. This package makes it easy to switch between them.

Installation

$ npm install git-checkout.js --save-dev

Usage

Script

Inside your package.json, add the following to scripts.

"checkout": "NODE_PATH=. node ./node_modules/git-checkout.js/src/index.js"

Execution

Now you can checkout your branch with:

$ npm run checkout my-branch

Author

Julian Claus and contributors.

License

MIT

1.1.19

6 years ago

1.1.18

6 years ago

1.1.17

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago