This article is a mirror article of machine translation, please click here to jump to the original article.

View: 8123|Reply: 0

What is npm? What is npm?

[Copy link]
Posted on 12/14/2016 10:36:03 AM | | |
npm makes it easy for JavaScript developers to share and reuse code, and it makes it easy to update the code that you're sharing.


If you've been working with Javascript for a while, you might have heard of npm: npm makes it easy for Javascript developers to share the code that they've created to solve particular problems, and for other developers to reuse that code in their own applications.

Once you're depending on this code from other developers, npm makes it really easy to check to see if they've made any updates to it, and to download those updates when they're made.

These bits of reusable code are called packages, or sometimes modules. A package is just a directory with one or more files in it, that also has a file called "package.json" with some metadata about this package. A typical application, such as a website, will depend on dozens or hundreds of packages. These packages are often small. The general idea is that you create a small building block which solves one problem and solves it well. This makes it possible for you to compose larger, custom solutions out of these small, shared building blocks.

There's lots of benefits to this. It makes it possible for your team to draw on expertise outside of your organization by bringing in packages from people who have focused on particular problem areas. But even if you don't reuse code from people outside of your organization, using this kind of module based approach can actually help your team work together better, and can also make it possible to reuse code across projects.

You can find packages to help you build your application by browsing the npm website. When you're browsing the website, you'll find different kinds of packages. You'll find lots of node modules. npm started as the node package manager, so you'll find lots of modules which can be used on the server side. There are also lots of packages which add commands for you to use in the command line. And at this point you can find a number of packages which can be used in the browser, on the front end.

So now that you have an idea of what npm can do, let's talk about how it works. When people talk about npm, they can be talking about one of three things. They could be talking about the website, which we've just been looking at. Or they could be talking about the registry, which is a big database of information about packages that people are sharing. Or the third thing they could be talking about is the client: when a developer decides to share their code, they use the npm client which is installed on their computer to publish that code up to the registry. And once there's an entry for this package in the registry, then other developers can use their npm clients to install the package from the registry. The entry in the registry for this package is also reflected on the website, where there's a page dedicated to this new package.

So that's what npm is. It's a way to reuse code from other developers, and also a way to share your code with them, and it makes it easy to manage the different versions of code.


npm makes it easy for JavaScript developers to share and reuse code, and it is easy to update the code you share.


If you've been using Javascript for a while, you've probably heard of npm:npm makes it easy for Javascript developers to share the code they create to solve specific problems while other developers can use it in their own applications.

Once you rely on this code from other developers, npm makes it easy to check if they have any updates and download them when they are updated.

The reusable code for these bits is called a package and sometimes a module. A package is simply a directory containing one or more files, and a file called "package.json" that contains some metadata about this package. A typical application, like a website, will depend on dozens or hundreds of packages. These bags are usually small. The general idea is that you create a small building block, solve a problem, solve it. This allows you to build larger custom solutions in these small, shared building blocks.

This has many benefits. It makes it possible for your team to leverage packages from professionals outside of your organization to bring in people who specialize in specific problem areas. But even if you don't repeat code from people outside your organization, using this module-based approach can actually help your team work better and reuse code across projects.

You can find packages that help you build your app by browsing the npm website. When you browse the website, you will find different types of packages. You will find a lot of node modules. npm starts as a node package manager, so you'll find a lot of modules available on the server side. There are also many packages that add commands for you to use on the command line. At this point, you can find some packages that you can use in the browser, on the frontend.

So now that you have an idea of what npm can do, let's talk about how it works. When people talk about npm, they can talk about one of three things. They may be talking about a website we just looked at. Or they may be talking about the registry, which is a big database of information in packages that people are sharing. Or the third thing they can talk about is the client: when a developer decides to share their code, they publish it to the registry using the npm client installed on their computer. Once the package has an entry in the registry, then other developers can install the package from the registry using their npm client. Entries in the registration form for this package are also reflected on the website, which has a page dedicated to this new pack.

This is what npm is. It is a way to reuse code from other developers and to share it with them, and it makes it easier to manage different versions of code.





Previous:Linux sets up DNS servers
Next:node.js initialize with package.json
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com