Skip to content

Latest commit

 

History

History
79 lines (44 loc) · 3.37 KB

what-is-npm.md

File metadata and controls

79 lines (44 loc) · 3.37 KB

What is npm?

npm is the world's largest software registry, with approximately 3 billion downloads per week. npm opens up an entire world of JavaScript talent to you and to your team. The registry contains over 600,000 packages (building blocks of code). Open-source developers from every continent share and borrow packages through npm, accessing algorithms designed across the planet or across the street. Packages follow specific structures to enable you to track and manage versions and multiple dependencies. Here is a quick introduction to npm:

<iframe width="670" height="480" src="https://www.youtube.com/embed/x03fjb2VlGY" frameborder="0" allowfullscreen></iframe>

npm consists of three distinct components:

  • the website
  • the registry
  • the Command Line Interface (CLI)

The website is the primary way developers discover packages, set up profiles, and manage other aspects of their npm experience.

The registry is a large database of information about packages.

The CLI runs from a terminal. This is how most developers interact with npm.

A Few Key Ways to use npm

  • Adapt packages to your apps, or incorporate them as they are.

  • Download standalone tools to use right away.

  • Run packages without downloading using npx.

  • Share code with any npm user, any where, or restrict code to specific developers.

  • Form virtual teams (orgs).

  • Manage multiple versions of code and code dependencies.

  • Update applications easily when underlying code is updated.

How to Find Packages

To find packages, start with the npm search bar.

While browsing, you'll find:

  • Node modules, which can be used on the server side.
  • packages that add commands for you to use in the command line.
  • packages that can be used on the front end of websites.

(To understand the difference between node modules and packages, click here).

Example: Finding a Package

For example, suppose you wanted to use bar codes (QR codes) in your application. Rather than spend weeks figuring out how to do this, why not see if someone has posted a package that creates QR codes? Start by entering a value in the search bar:

blanksearchbar

Related options will appear:

choicessearchbar

Or, click, to filter the possibilities even more:

filtersearchbar

When you choose a package to explore, more information appears. This information is written by the package author(s) so details vary.

searchresults

Now, you can read the developer's instructions to discover how to use this package.

Next Steps

Now that you know what npm is, and a bit about how to use it, it's time to get started. Install npm. We look forward to seeing what you will create!

Learn More

To learn more about npm as a product, new features on the way, and interesting uses of npm, sign up for our newsletter at npm-weekly.

To explore additional features that you might wish to use as your project evolves, click [here] (https://www.npmjs.com/pricing).``