Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we clone a git repository in node_modules when we do npm install?

How can we clone a git repository when we install our dependency in npm.

"dependencies": {
    "<Mydependency>": "<some git url>",
    "promise": "^7.0.3",
    "react": "^0.14.8",
    "react-addons-pure-render-mixin": "^0.14.0",
    "react-dom": "^0.14.8",
    "react-mixin": "^2.0.2"
  },
like image 240
Darpan Rangari Avatar asked Oct 17 '22 19:10

Darpan Rangari


1 Answers

Use this: in the package.json

Without password:

"Mydependency": "git+https://<somegiturl.git>#<branch>"

with password:

 "Mydependency": "git+https://<userName>:<password>@bitbucket.org/myrepo.git#<branch>"
like image 82
Vishnu Mishra Avatar answered Oct 31 '22 17:10

Vishnu Mishra