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

View: 7266|Reply: 0

npm tutorial (1): What is npm?

[Copy link]
Posted on 12/13/2017 11:09:42 AM | | |
If you've been using Javascrip{filter}t, you've probably heard of npm. npm makes it easy for Javascrip{filter}t developers to share the code they create to solve a specific problem and let other developers reuse that code in their own applications.

Once you rely on code from other developers, npm can easily check if they have made any updates and download them when they do.

These reusable codes are called packages or modules. A package is simply a directory containing one or more files, and a file called "package.json" that contains metadata about the package. A typical application, like a website, will depend on dozens or hundreds of packages. These packages are usually small, and the general idea is that you create a small piece that solves a problem well. This allows you to build larger, custom solutions from these small building blocks.

This has many benefits, allowing your team to attract professionals outside the organization by getting packaging from people who focus on a specific problem area. Even without reusing code outside your organization, using this module-based approach can help your team work better together and can reuse code across projects.

You can find packages to help you build your app by browsing the npm website. When you browse the website, you will find a lot of Node modules. npm started as a Node package manager, so you'll find a lot of modules that can be used on the server side. There are also many package add commands for you to use on the command line. You'll also find packages that you can use on the frontend.

npm consists of three different parts: the website, the registry, and the CLI. The website is the main tool for users to discover packages, the registry is a large database of package information, and the CLI is how developers publish their packages on the registry or download packages they wish to install.

npm is a way to reuse code from other developers, and it is also a way to share code with others, and it is easy to manage different versions of code.




Previous:Fiddler-AutoResponder regular matching example
Next:npm tutorial (2): Installing and using npm
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