npm-intro Flashcards

1
Q

What is NPM?

A

npm consists of three distinct components:

the website
the Command Line Interface (CLI)
the registry.

It’s an online repo for publishing of open source Nodejs projects.

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

What is a package?

A

A package is a bit of reusable code. It’s a directory with one or more files in it.

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

How do you create a package.json with npm?

A

Type the command ‘npm init’ in the terminal

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

What is a npm dependency?

A

Package required for for your application in production. Dev-dependencies are packages that are only needed for local development and testing. You add a dependency by installing a package

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 package is listed in package.json as either a dependency(which is default) or as a dev-dependency.

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