npm-intro Flashcards
What is NPM?
node package manager is a sharing platform for devs to share their code in the form of packages
when ppl talk about npm, they mention three things:
- website
- registry
- cli
What is a package?
a directory with one or more files
+
package.json
How can you create a package.json with npm?
npm init -y
What is a dependency and how to you add one to a package?
third party code that your code needs in order to run
npm install (insert)
What happens when you add a dependency to a package with npm?
npm install does two things:
- downloads dependency from registry to your local directory
- then updates package.json to list the dependencies
3 requirements before you use download a package
- github/lab repository needs to be public
you need to see the code before you install it - needs to have documentation
means they care/don’t care
if you run into issues you won’t have docs to refer to
-are people using it? check to see if downloads are over a couple hundred.