npm-intro Flashcards

1
Q

What is NPM?

A

Npm is the world’s largest software registry. Open source developers use npm to share and borrow packages and many organizations use npm to manage privat development. It consists of three components: the website, the command line interface (cli), and the registry.

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 file or directory that is described by 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

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 the packages required by your application in production. To add one to a package: 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

Package.json gets updated with the dependency; makes node_modules folder that includes the package you installed

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