Why use build tools? Bottom line
: Automating tasks that require repetitive iterations, such as compression (Minification), compilation, unit testing, linting, and so on, can ease your labor and streamline your work. When you properly configure the task, the task runner will automatically help you or your team to do most of the boring work.
Grunt, what's this stuff? Recently very hot front-end automation gadget, task-based command-line build tool http://gruntjs.com why use grunt? The biggest benefit of using grunt is the consistency it brings to the team. If you've worked with a lot of people, you'll know how confusing the inconsistencies in the code are. Grunt enables teams to work with a standardized set of commands, thus ensuring that each member of the team writes code with the same standards. After all, there is nothing more painful than failure to run because of inconsistent code. Grunt also has a growing community of developers, as well as a growing number of new plugins. The threshold for learning to use Grunt is very low because many tools and automation tasks are already available. How to use Grunt1 Official document: Http://gruntjs.com/getting-started2 Chinese Document: http://www.gruntjs.net/docs/getting-started/
when you have a basic understanding of grunt, please read the next article