NPM Flashcards

1
Q

[NPM intro]

What is NPM?

A
A website (npmjs.com)
A Command Line Interface (CLI)
The Registry (where to get packages from)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

[NPM intro]

What is a package?

A

A directory with package.json in it and one or more other files.

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

[NPM intro]

How can you create a package.json with npm?

A

while in the directory, using the CLI:

npm init –yes

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

[NPM intro]

What is a dependency and how do you add one to a package?

A

Libraries or software that is required for that specific package, you can add it by installing inside the directory with the package.json file.

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

[NPM intro]

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

A

It is listed inside the package.json object under dependencies.
It installs the node modules in the directory as well.

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