Grunt api

Grunt api

Grunt 通过 grunt 对象暴露所有方法和属性,并将此对象赋予module.exports函数,这些方法和属性都将传递到你的Gruntfile、Grunt插件或者task文件中。

以下所有的方法几乎都是在别处定义的,但是为了方便使用,也在grunt对象中做了定义。

详细的解释和案例请参阅各个api单独的文档。

常用 Grunt api

grunt

grunt.config

grunt.event

grunt.file

grunt.log

grunt.option

grunt.task

grunt.template

grunt.util