Git repository to a dependency in package.json

Viewed 4399

I am having a git repository and want to use this repository as a dependency in package.json file of some other project so that it can be downloaded as we run npm command. can anyone help me out?

3 Answers

Try this.

"dependencies": {
    "<repo>": "<user>/<repo>#<branch>",
}

Example:

"dependencies": {
   "botkit": "jonchurch/botkit#master",
}

Reference is here!

Related