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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can you create a package.json with npm?

A
  1. cd /path/to/package

2. npm init –yes / npm init -y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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 __

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens when you add a dependency to a package with npm?

A

A node_modules directory is created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly