npm Flashcards
1
Q
What is npm?
A
the package manager for Node.js
- the website, the CLI, and the registry
2
Q
What is a package?
A
a directory with a package.json and one or more files
3
Q
How can you create a package.json with npm?
A
run ‘npm init –yes’ within the current working directory
4
Q
What is a dependency and how do you add one to a package?
A
- a package required by your application to run
- ‘npm install ‘package-name’’
5
Q
What happens when you add a dependency to a package with npm?
A
the package gets downloaded from the registry into a node-modules directory, and will update the package.json file