npm and Webpack Flashcards

1
Q

What is NPM?

A

NPM can be use used to share and and borrow packages with three components: the website, command line interface, the registry

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

What is a package?

A

Bits of reusable code/ directory with one or more files to it and contains 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

using npm init command with –yes or -y flag

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

Dependency is any packages that directory depends on using npm install command

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

Installs a package and any packages that it depends on

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

What is Webpack?

A

bundles of javaScript modules - wraps the modules and concatenates them into a huge file

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

How do you add a devDependency to a package?

A

npm install –save-dev “name”

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

What is an NPM script?

A

shortcut commands that runs a code that we installed on devDependencies and other npm registry files

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

How do you execute Webpack with npm run?

A

npm run nameOfScript

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