How to Install a NPM Module from GitHub Branch

In my journey to work more quickly with a project containing loads of dependencies, I’ve come across a few techniques I’ve not needed to use before. I previously wrote about How to Push to a Git Remote Branch of a Different Name — this time we’ll talk about installing a module from another repository instead […]

The post How to Install a NPM Module from GitHub Branch appeared first on David Walsh Blog.


This content originally appeared on David Walsh Blog and was authored by David Walsh

In my journey to work more quickly with a project containing loads of dependencies, I’ve come across a few techniques I’ve not needed to use before. I previously wrote about How to Push to a Git Remote Branch of a Different Name — this time we’ll talk about installing a module from another repository instead of a published version.

To install a module from a GitHub branch instead of a tagged and published NPM module, simply reference the username, repository, and branch name:

"dependencies": {
    "eth-ledger-bridge-keyring": "darkwing/eth-ledger-bridge-keyring#work-in-progress",
}

This pattern is useful for a host of reasons, especially when trying to rapidly develop from local branches. Feel free to leave off the branch name if you just want to use master branch!

The post How to Install a NPM Module from GitHub Branch appeared first on David Walsh Blog.


This content originally appeared on David Walsh Blog and was authored by David Walsh


Print Share Comment Cite Upload Translate Updates
APA

David Walsh | Sciencx (2021-02-12T02:23:00+00:00) How to Install a NPM Module from GitHub Branch. Retrieved from https://www.scien.cx/2021/02/12/how-to-install-a-npm-module-from-github-branch/

MLA
" » How to Install a NPM Module from GitHub Branch." David Walsh | Sciencx - Friday February 12, 2021, https://www.scien.cx/2021/02/12/how-to-install-a-npm-module-from-github-branch/
HARVARD
David Walsh | Sciencx Friday February 12, 2021 » How to Install a NPM Module from GitHub Branch., viewed ,<https://www.scien.cx/2021/02/12/how-to-install-a-npm-module-from-github-branch/>
VANCOUVER
David Walsh | Sciencx - » How to Install a NPM Module from GitHub Branch. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/02/12/how-to-install-a-npm-module-from-github-branch/
CHICAGO
" » How to Install a NPM Module from GitHub Branch." David Walsh | Sciencx - Accessed . https://www.scien.cx/2021/02/12/how-to-install-a-npm-module-from-github-branch/
IEEE
" » How to Install a NPM Module from GitHub Branch." David Walsh | Sciencx [Online]. Available: https://www.scien.cx/2021/02/12/how-to-install-a-npm-module-from-github-branch/. [Accessed: ]
rf:citation
» How to Install a NPM Module from GitHub Branch | David Walsh | Sciencx | https://www.scien.cx/2021/02/12/how-to-install-a-npm-module-from-github-branch/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.