Grunt (JavaScript World building tools) Basics Summary

Source: Internet
Author: User

1 grunt and Grunt plugins are installed and managed via NPM, NPM is a node. js Package Manager

2 GRUNT-CLI is grunt plug-in, install it into the global environment can execute grunt command in any directory, GRUNT-CLI task is simple: Call Gruntfile in the same directory grunt.

3 You need to add two files in your grunt project: Package.json and Gruntfile

Package.json: This file is used by NPM to store the item's metadata in order to publish the project as a NPM module. You can list the project-dependent grunt and grunt plugins in this file and place them in the Devdependencies configuration section.

Gruntfile: This file is named Gruntfile.js or Gruntfile.coffee, which is used to configure or define tasks (Task) and load the grunt plug-in.

4 the npm install command installs dependencies to the current version according to each dependency listed in the Package.json file.

5 Use the npm install <model>--save-dev command to install the model and add it to the Devdependencies configuration section, such as the command to install grunt for NPM install <model>--save-dev

6 Grunt Plugin list is address: Http://www.gruntjs.net/plugins

Grunt (JavaScript World building tools) Basics Summary

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.