This package has been deprecated

Author message:

this package has been deprecated

git-checkout.js

1.1.19 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i git-checkout.js

Weekly Downloads

1

Version

1.1.19

License

MIT

Last publish

Collaborators

  • dhjd9m