npm-intro Flashcards

1
Q

What is NPM?

A

It consists of:
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

packages are comprised of software and metadata.
A package is a file in a directory that is described by a package.json file.
A package must contain a package.json file in order to be published to the npm registry.

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

Any packages that a package depends on.

By default, npm install will install all modules listed as dependencies in package.json.

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

Install the dependencies in the local node_modules folder.

package.json file gets updated

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