npm Flashcards

1
Q

What is NPM?

A

software registry. a way to reuse code from other developers and for you to share your code.

-website
-Command Line Interface (CLI)
-package registry

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 one or more files in it that also has a file called package.json with some metadata about this package

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

navigate to root directory of package
run command: 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

Packages required by your application in production

npm install <pkg></pkg>

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 install 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