03 - NPM Packages - Part-02

 
// You see its not a good practice to directly install
// npm packages from your current directory directly without initializing
// it with "npm init"
// also, never send anyone or publish your node-package folder and 
// package-lock.json file. Only send/publish other files including 
// package.json file.
//
// first after moving into your newly created project directory,
// write in cmd/terminal: npm init
// answer some questions or just press enter
// With this, you will have package.json automatically created inside
// your project directory
//
// now, install any npm packages you need and notice how this changes
// your package.json file.
// Now, make required changes in index.js and other files
// but note that never publish the node package folder and the 
// package-lock.json file as these might contain some of your system information.
// 
// Once you send your project including package.json to someone
// ( or publish it somewhere then the person who downloaded it)
// and they want to run it onto their system, 
// they can just go to your project directory that they downloaded
// and in cmd/terminal they can write: 
    npm install
    ===========
// This will install all the npm packages/ dependencies
// needed to run the project successfully as mentioned
// in the package.json file.



// Now here we have installed a package called figlet with:
// npm install figlet

// see the changes it made in package.json file:
// package.json

// To see how we are using this npm package figlet installed above,
Click here

// To see which packages are installed currently under your project,
// check in dependencies inside package.json file in your project directory

// To find other packages which are there in npm,
// go to: https://www.npmjs.com/