NPM Flashcards

1
Q

What is NPM?

A

A software registry that makes it easy to share and use the code from other developers

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

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

Use the npm init command with a —yes or -y flag

Uses info extracted from the current directory

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

If a package depends on another package & use npm install command

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

package.json gets update to show the dependency and it gets downloaded to node modules directory

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