npm Flashcards

1
Q

What is NPM?

A

npm is the world’s largest software registry. It can be used to share and borrow packages

It has three components:

the website
the Command Line Interface (CLI)
the registry

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

What is a package?

A

a package or module of code to reuse.

It needs to be a directory with one or more files

It has a package.JSON file

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

Run the “npm init –yes” command on the command line

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

dependencies are the modules that the project relies on to function properly.

npm 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

The newly installed package(s) gets added to the list of dependencies in your package. json file

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