NPM Flashcards
1
Q
[NPM intro]
What is NPM?
A
A website (npmjs.com) A Command Line Interface (CLI) The Registry (where to get packages from)
2
Q
[NPM intro]
What is a package?
A
A directory with package.json in it and one or more other files.
3
Q
[NPM intro]
How can you create a package.json with npm?
A
while in the directory, using the CLI:
npm init –yes
4
Q
[NPM intro]
What is a dependency and how do you add one to a package?
A
Libraries or software that is required for that specific package, you can add it by installing inside the directory with the package.json file.
5
Q
[NPM intro]
What happens when you add a dependency to a package with npm?
A
It is listed inside the package.json object under dependencies.
It installs the node modules in the directory as well.