TIL Adding a repo as a dependency in package.js
POSTED ON:
TAGS: javascript npm
npm install --save username/repo#branch-name-or-commit-or-tag
The above installs a node package from github into your node_modules folder and automatically adds the dependency to your package.json! It’s marginally safer to install at a specific commit hash or git tag instead of a branch name. This way your dependency is tied to a specific commit, instead of whatever the latest commit is on a branch.
Related TILs
Tagged: javascript