npm-intro Flashcards

1
Q

What is NPM?

A

npm stands for Node Package Manager and is a website, a CLI and a registry. Users can share packages or modules containing code. npm manages and installs the code into for you.

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 directory with files containing reusable code and a package.json file.

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

Using the command “npm init” on the root directory.

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 package/module that was added to your code and is added using the command “npm install “.

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.json dependency object gets updated with the package added with npm.

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