npm Flashcards

1
Q

What is NPM?

A

(Website, CLI, the registry) A package manager for the JavaScript language used by programmers to share code (packages) with one another.

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 a package.json that can be shared with other developers to incorporate into other uses.

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

npm init –yes

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 package needed for your application to work.
You add one with the ‘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

It’s added to the dependecies property of the package.

it generates a node-modules folder with the packages inside.

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