npm-intro Flashcards
What is NPM?
npm is the world’s largest software registry. Developers share and borrow packages
The website
the Command Line Interface (CLI)
the registry
What is a package?
A package is a file or directory that is described by a package.json file. A package must contain a package.json file in order to be published to the npm registry. For more information on creating a package.json file, see “Creating a package.json file”.
How can you create a package.json with npm?
On the command line, navigate to the root directory of your package.
– cd /path/to/package
Run the following command:
– npm init –yes
What is a dependency and how to you add one to a package?
A dependency is another package that your package needs in order to work.
ex: npm install jquery
What happens when you add a dependency to a package with npm?
a directory is added to the directory of the package you added the dependency to and the dependencies data is added