Grunt Common Function Description:
Building tools for the Grunt:javascript world,
Grunt.initconfig: Defines parameters for various modules, one for each member of the same name module.
Grunt.loadnpmtasks: Load the required modules for completion.
Grunt.registertask: Defines a specific task. The first parameter is the task name, and the second parameter is an array that represents the module that the task needs to use once.
For a module configuration, it accepts an object as a parameter. The member of the object is associated with a module using the same name--corresponding,
(JS file compression code)
Project configuration.
Grunt.initconfig ({
Uglify: {
My_target: {
Files: [{
1. If set to True, the placeholder (that is, *) of the following file name is extended to a specific file name.
Expand:true,
2. The directory where the file (input) needs to be processed.
CWD: ' Src/js ',
3. Indicates the files that need to be processed. If an array is used, each item of the array is a file name, and wildcard characters can be used.
SRC: ' **/*.js ',
4. Indicates the file name or directory in which it was processed.
Dest: ' Dest/js '
}];
}
}
});
Grunt-js file compression