How to compress files with grunt

Source: Internet
Author: User

Once the GRUNT-CLI is complete, you can install grunt for each item. 1. First copy the Package.json and Gruntfile.js to the project (PS: These two files are required when each project turns grunt) 2.cmd go to the project directory and execute "NPM install grunt--save-dev" (PS: This step is used to grunt the project) 3. Configure the Gruntfile.js (PS:package.json generally do not move it, name can be set to the project name, others do not move) {expand:true,cwd: ' js ', src: [' */*.js '],//Specifies the directory file that needs to be compressed dest: ' dest '//Set the compressed document name}4.cmd Execute "Grunt" 5.ok, quietly wait for the compressed file batch compression okay

How to compress files with grunt

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.