Nodejs, NPM, grunt--noun explanation

Source: Internet
Author: User

Recently embarked on the development of a new project, intends to work from an engineering perspective of a set of its own front-end development, release system.

Grunt these tools, before others use I also use, and did not seriously think about their past life, just take advantage of this opportunity, I have to reason for the current industry is more popular these tools of use and mutual relationship.

First, the noun explanation

nodejs--environment where JS code can be executed locally (Java-like JDK)
Npm--nodejs Management and distribution tools for packages
grunt--run on Nodejs, task-based, project building tools (Maven in Npm+grunt≈java)

My understanding is to build a web front-end project as an example:
1. In order to conveniently compress the JS file, I wrote a nodejs program A;
2. Later the project also appeared merged JS, compression CSS and other requirements, so I continued to write the Nodejs program BCD;
3. With the increase in ABCD, and ABCD to meet the flexible configuration requirements of my different projects, it is urgent to need a tool to manage the introduction and configuration of many Nodejs programs, So--grunt appeared;
4. Grunt fire up, I also want to use, that before the JS compression program A because it is not compatible with grunt, so I made a slight change, made a for grunt;
5. Slowly many developers on the Nodejs developed a lot of XX for Grunt and played a popular name, called Grunt plug-ins, can be managed through NPM;

The above set of systems, and then take Java to do the following analogy:
Jetty is a javaweb server, I can directly install the boot, can also use MAVEN this tool to install "Jetty for maven" This plugin and launch it;
Uglify is a nodejs program, I can directly introduce the run, can also use grunt this tool to download the introduction of "grunt-contrib-uglify" this plugin and run it.

Nodejs, NPM, grunt--noun explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.