[Surrounding] the code is npm What?

community 

There is an ancient cultural programmer community:

Community means: people with common interests or professional, voluntary organization together, to cooperate by sharing information and resources. Participants of virtual communities often discuss related topics online, or visit certain websites.
There are also front-end programmer community, the largest in the world community should be the front end of GitHub. To the front by GitHub

Share source code (online code repository)
to discuss the issue (Issue List)
collection of learning resources and frequented sites (such as my collection of high-quality Chinese front-end blog)

One of the biggest benefits of joining the community, you can use the code contributed by others, you can also use to contribute code to others.

before:  

  That is how front-end code sharing it?

  In the era of the rise of yet GitHub, the front end is to share code via a URL, for example, you want to use jQuery, then you click on the link provided on the jQuery site you can download jQuery, put on their own websites use, the rise of GItHub, community Some people use GitHub download function:

Trouble
when a website relies more and more code, programmers find that this is a very troublesome thing:
go to the official website to download jQuery jQuery
to BootStrap official website to download BootStrap
to Underscore official website to download Underscore
......
I believe that this time a lot of programmers by not a bird, and that this time we need a big God.

later:
  Has three virtues of a programmer Isaac Z. Schlueter (hereinafter referred to as Isaaz) gives a solution: using a tool to centralize these codes to work together to manage it!
  This tool is his use JavaScript (running on Node.js) written npm, full name is Node Package Manager

NPM thinking something like this:

  1. buy a server as a code repository (registry), all that needs to be put inside shared code

  2. mail notification jQuery, Bootstrap, Underscore authors use npm publish to submit code to the registry, were named jquery, bootstrap and underscore (note the capitalization)

  3. Other people in the community if you want to use the code, put jquery, bootstrap and underscore wrote package.json, and then run npm install, npm will help them to download the code

  4. Download the complete code appears in node_modules directory, free to use.

These codes can be used to be called "package" (package), which is the origin of the NPM name: Node Package (package) Manager (Manager).

development of:

So npm is how the fire it?

npm development is with Node.js development of complementary.

Node.js is a programmer working in Germany and American Ryan Dahl wrote. He wrote Node.js, but the lack of a Node.js package manager, so he npm and author of hit it off, hold together for warmth, Node.js eventually built npm.

Then what we all know, Node.js fire.

With the popular Node.js, it began to share npm JS code, so jQuery jQuery authors to publish the npm.

So now, you can use npm install jquery to download the jQuery code.

Now with npm to share code has become a standard on the front.

Follow-up:

  

Node.js is currently the company Ryan Dahl was located joyent continue to develop. Ryan Dahl now has to study AI and machine learning, and his right to the maintenance of the Node.js Isaaz. (I should not have to study AI and machine learning ah coach)

And after Isaaz maintained for some time, resigned, the company set up a special registry maintained npm, the company name is called npm Co., Ltd. ...... Who says open source can not make money ~

The Power of Community:

Recalling the development of front-end is that you will find that a person is in the community, issued a code that ultimately affect the front end of the trend a few years. Such as jQuery, such as Node.js, such as npm. (In fact, other languages ​​are also such)

Therefore, the power of the community is great, do not underestimate this blog garden vegetable garden.

 

Refer to the original: https: //blog.csdn.net/andrelia20171760/article/details/90576030

Guess you like

Origin www.cnblogs.com/shendidi/p/12335603.html