NPM Flashcards
1
Q
What is NPM?
A
A software registry that makes it easy to share and use the code from other developers
2
Q
What is a package?
A
A directory with one or more files in it. That also has a file named package.json with some meta data about this package
3
Q
How can you create a package.json with npm?
A
Use the npm init command with a —yes or -y flag
Uses info extracted from the current directory
4
Q
What is a dependency and how to you add one to a package?
A
If a package depends on another package & use npm install command
5
Q
What happens when you add a dependency to a package with npm?
A
package.json gets update to show the dependency and it gets downloaded to node modules directory