"Go" grunt dynamically generated file name

Source: Internet
Author: User

Dynamically generate file names
    • expandSet to true open the following options

    • cwdThe path specified by all src specified files relative to this property

    • srcTo match the path, relative to the CWD

    • destThe target path prefix of the build

    • extReplace all generated target file suffixes with this property

    • flattenDelete all generated dest paths section

    • renameA function that accepts a match to the file name, and matches the target location, returning a new destination path

Grunt.initconfig ({minify: {dynamic_mappings: {//Grunt would search for "**/?". JS "under" lib/"when the" Minify "task runsfiles: [{expand:true,//Enable dynamic expansion.CWD: ' lib/'//SRC matches is relative to this path.SRC: [' **/?. JS '],//Actual pattern (s) to match.Dest: ' build/',//Destination path prefix.Ext: '. Min.js ',//Dest filepaths 'll has this extension.                }            ]        }    }});

Original: Http://www.hulufei.com/post/grunt-introduction

"Go" grunt dynamically generated file name

Related Article

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.