npm Flashcards

1
Q

What is NPM?

A

The world’s largest software registry.
Consists of three distinct components: the website, the CLI, the registry
CLI runs from a terminal, and is how most developers interact with npm.
Registry: large public database of JavaScript software and the meta-information surrounding it

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

What is a package?

A

Also called “modules”
Reusable code that other developers can use. Like shared building blocks to solve problems
Directory with one or more files in it, that also has a file called package.json with some meta-data about this package
* a directory that has package.json

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 do you add one to a package?

A

Modules that the project relies on to function properly
When you install a package…?
* package that your package needs to run.
* npm install [name of package]
* npm install jquery

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 automatically listed in the package.json file, under the dependencies list

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