Grunt is a tool framework based on Npm,node.js with JS, which can automate some repetitive tasks (such as merging files, grammar checking, compressing code),
Grunt has a large library of plug-ins to meet a variety of automated batch processing needs, commonly used plug-ins are:
Concat---> Merge files
Csslint---> CSS grammar checker
Cssmin---> CSS compression
Jshint---> JS grammar checker
Uglify---> JS compression
Watch---> Automation core, monitor file modifications and execute plugins
Plug-in Installation instructions:
NPM Install grunt-contrib-concat--save-devnpm install grunt-contrib-csslint--save-devnpm Install Grunt-contrib-cssmin--save-devnpm Install grunt-contrib-jshint--save-devnpm Install grunt-contrib-uglify-- SAVE-DEVNPM Install Grunt-contrib-watch--save-dev
NPM Package.json Configuration after installing the plugin
1 {2"Name": "Grunt_test",3"Version": "1.0.1",4"Devdependencies": {5"Grunt": "^1.0.1",6"Grunt-contrib-concat": "^1.0.1",7"Grunt-contrib-csslint": "^2.0.0",8"Grunt-contrib-cssmin": "^1.0.2",9"Grunt-contrib-jshint": "^1.0.0",
One"Grunt-contrib-uglify": "^2.0.0", A"Grunt-contrib-watch": "^1.0.0" - } -}
[The weight of the heaviest] Gruntfile.js Grunt configuration file
Grunt--JavaScript automation tools