Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify npm dependency as github subfolder url?

Tags:

git

github

npm

My git repository:

README.md
packages
  common
    package.json
  main
    package.json

How to specify common dependency in main package.json as github subfolder url?

This does not work "common": "git://github.com/<user>/<project>/packages/common.git"

like image 830
monkey Avatar asked Sep 24 '16 18:09

monkey


People also ask

How do I use npm on GitHub?

To npm install a public project that is hosted on Github, and not the NPM registry, add the Github repo to package. json dependencies using the username/repo#branch-name format. Run npm install and npm will download the project and save it into your /node_modules/ folder.


1 Answers

It looks like this is not supported by NPM, and the NPM team appears to have no interest in supporting this functionality.

https://github.com/npm/npm/issues/2974

like image 192
detran Avatar answered Oct 19 '22 19:10

detran