npm-intro Flashcards

1
Q

What is NPM?

A

package manager for JavaScript; a way to reuse/use code from other developers and also a way to share your code, and it makes it easy to manage the different versions of code.

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

What is a package?

A

aka modules, a directory with one or more files in it; a small building block of reusable code.
A folder containing a program 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/-y; –yes/-y if you want to create using info extracted from current 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

dependencies are intended as development-only packages unneeded in production. You need to add the –save-prod flag to add dependencies

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 dependencies key appears in the package’s package.json file

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