npm-intro Flashcards
1
Q
What is NPM?
A
npm stands for Node Package Manager and is a website, a CLI and a registry. Users can share packages or modules containing code. npm manages and installs the code into for you.
2
Q
What is a package?
A
A package is a directory with files containing reusable code and a package.json file.
3
Q
How can you create a package.json with npm?
A
Using the command “npm init” on the root directory.
4
Q
What is a dependency and how to you add one to a package?
A
A dependency is package/module that was added to your code and is added using the command “npm install “.
5
Q
What happens when you add a dependency to a package with npm?
A
The package.json dependency object gets updated with the package added with npm.