DEV Community

Discussion on: NodeJS: How to Get External Packages / npm

Collapse
 
aminnairi profile image
Amin

Great article, thanks!

Did you know that you could install GitHub repositories as packages as well?

$ npm install --save-dev i3bar/core
$ # installs from https://github.com/i3bar/core

How cool is that?

Collapse
 
miku86 profile image
miku86

Hey Amin,

thanks for your tip, I added a link for the npm install docs,
so everyone can have a look at all the npm install possibilities.

Do you see any advantages in installing from github?

Collapse
 
aminnairi profile image
Amin

When crafting an NPM package and you want to test that you did not forget anything by simulating an installation. This is quite a handy feature. Plus, there will be, I'm sure, more third party package hosting in a near future that will be compatible with the NPM CLI.

Another advantage is that you are not forced to publish your package on the NPM package registry if you don't want to but still be able to open-source the package. Sometimes it can be quite tedious to think about checking and publishing your next versions of your packages when you could just instead merge requests and publish a git tag.