It has the following functions
Merge JS files
Compress JS files
Unit Testing (based on QUnit)
In a word: fully automated (automation)
Here is its installation process.
1. Install node
Getting started with reference to nodejs (the latest node will automatically install npm)
2. Install grunt command line tool grunt-cli
Use -g to install globally, so that it can be used in any directory. Command: npm install -g grunt-cli
It should be noted that there are sometimes errors without permissions in Linux or Mac. At this time, you must add a sudo to the front.
After installation, you can view the version of the change tool. Command: grunt -version
3. Install grunt and its plug-ins
Enter the root directory of a project and use the command: npm install grunt --save-dev
At this time, checking the grunt version again will have an additional 4.0, as follows
At this point, the installation is complete.