Grunt-js file compression

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.