NPM Flashcards

1
Q

How do you create a private npm package?

A

Name the package name @username/package-name in your package.json file

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

When publishing a package, which dependencies are ignored?

A

Peer dependencies
Dev dependencies

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

What is a peer dependency?

A

These are dependencies that need to be manually installed in the application that consumes this package.

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

What is the purpose of the resolution property in a package.json file

A

This is used to resolve conflicts when two or more packages have conflicting versions of a package

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

How do I install a private package?

A

Login must be done by authorised user using npm login.

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