npm-intro Flashcards
What is NPM?
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.
What is a package?
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 can you create a package.json with npm?
npm init –yes/-y; –yes/-y if you want to create using info extracted from current directory
What is a dependency and how to you add one to a package?
dependencies are intended as development-only packages unneeded in production. You need to add the –save-prod flag to add dependencies
What happens when you add a dependency to a package with npm?
the dependencies key appears in the package’s package.json file