NPM intro Flashcards
What is NPM?
NPM is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.
npm consists of three distinct components:
• the website
• the Command Line Interface (CLI)
• the registry
What is a package?
Apackageis a file or directory that is described by apackage.jsonfile.A package must contain apackage.jsonfile in order to be published to the npm registry.
How can you create a package.json with npm?
Npm init —yes
What is a dependency and how to you add one to a package?
Dependency = a pack of code your application depends on
Npm install
What happens when you add a dependency to a package with npm?
Package.json gets updated; makes node_modules folder that includes the package you installed