NPM Flashcards
1
Q
What is NPM?
A
NPM is a software registry where developers can use and share software for others to use. Make up of three things. 1. Website 2. Registry 3. CLI
2
Q
What is a package?
A
Packages are bits of code that solve a particular problem. Packages are a directory with one or more files plus a file called package.json.
3
Q
How can you create a package.json with npm?
A
- cd /path/to/package
2. npm init –yes / npm init -y
4
Q
What is a dependency and how to you add one to a package?
A
A dependency is a library (code that someone else wrote) that a project needs to function effectively. It also holds the version number of the package. You can add a dependency by using npn install __
5
Q
What happens when you add a dependency to a package with npm?
A
A node_modules directory is created.