-
-
Save jothirnadh/c8077f21e570eec3fcc6c21b9828baf3 to your computer and use it in GitHub Desktop.
Revisions
-
tmcw created this gist
Apr 19, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,57 @@ npm is a package manager. it's a website that keeps a big catalog of software that can be installed by anyone. some of that software you use directly, but other software you use as parts. software you use directly: "bin" software you use as a dependency: "main" -------------------------------------------------------------------------------- npm works really well with GitHub, but isn't dependent on GitHub. when you publish a module to npm $ npm publish you upload a copy of that software to npmjs.org. When people install your module with npm $ npm install that-module they are downloading it from npmjs.org -------------------------------------------------------------------------------- To install software with npm, you use the `install` method. This both downloads and installs the software. There are two ways to install software - one which makes it easy to include as a part of your application, and another that lets you use the software directly: You install software as part of your application like $ npm install chalk --save chalk is a module you use by including it in your program: it helps your program color text. And you install software to use yourself like $ npm install cli-weather -g cli-weather shows you the weather: after you install it, you get a new command line command called `weather` that tells you the weather. -------------------------------------------------------------------------------- Let's install the weather $ npm install cli-weather -g Now run $ weather -a "Bangalore"