Home >Web Front-end >JS Tutorial >Installation of building web programs using GruntJS_javascript skills
It has the following functions
Merge JS files
Compress JS files
Unit testing (based on QUnit)
In one sentence: complete automation
The following is its installation process.
1. Install node
Refer to getting started with nodejs (the latest node will automatically install npm)
2. Install grunt command line tool grunt-cli
Use -g to install globally, so it can be used in any directory. Command: npm install -g grunt-cli
It should be noted that under linux or mac, an error of no permissions will sometimes be reported. In this case, a sudo must be added in front,
After installation, you can check the version of the 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, if you check the grunt version, there will be an additional 4.0, as follows
At this point, the installation is complete.