A summary of the installation run Grunt build tool on Mac (i)

Source: Internet
Author: User
Tags install node

Install node. js

Brew Install node. js

Installing grunt

npm install -g grunt-cli

1. New Package.json, configuring

{  "name": "domain.com",  "version": "0.1.0",  "Devdependencies": {    "grunt": "~0.4.1",    " Grunt-contrib-csslint ":" ~0.4.0 ",    " Grunt-contrib-jshint ":" ~0.11.1 ",    " Grunt-contrib-concat ":" ~0.5.1 ",    "Grunt-contrib-cssmin": "~0.12.2",    "grunt-contrib-uglify": "~0.8.0",    "grunt-contrib-imagemin": "~ 0.9.4 ",    " Grunt-contrib-watch ":" ~0.5.0 "  }}

2. Installing with sudo npm install

3. Write the Gruntfile.js file to verify the merge compression

4. Execute Grunt Command

Attached: Sea.js modular code, grunt packaging Https://www.npmjs.com/package/grunt-cmd-combo

Compress Picture: Smushit img (not useful)---grunt-contrib-imagemin this plugin works

Grunt Plugin Address: http://gruntjs.com/plugins

Reference Blog: http://www.cnblogs.com/yexiaochai/p/3603389.html

A summary of the installation run Grunt build tool on Mac (i)

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.