Install an npm package directly from github

Today I needed to install a package directly from npm because I’ve had to make some fixes in a third party library. So to be abble to test and use before the external library was updated on npm registry I’ve found a way to install it using npm. You can use the following command to install from git using the SSH protocol:

npm i git+ssh://git@github.com:eberlitz/angular2-img-cropper.git -S

or with HTTPS:

npm i git+https://git@github.com:eberlitz/angular2-img-cropper.git -S

References: