Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

grunt


May 25, 2021 Grunt


Table of contents


grunt

Grunt grunt and properties through the grunt module.exports which are passed to your Gruntfile, Grunt plug-in, or task file.

Almost all of the following methods are defined elsewhere, but for ease of use, they are grunt in the grunt object. For detailed explanations and cases, see the individual documentation for each api.

Config

grunt.initConfig

This method is an alias (alias) for the grunt.config.init method.

Create a task

grunt.registerTask

This method is an alias (alias) for the grunt.task.registerTask method.

grunt.registerMultiTask

This method is an alias (alias) of the grunt.task.registerMultiTask method.

grunt.renameTask

This method is an alias (alias) of the grunt.task.renameTask method.

Loading Externally-Defined Tasks

grunt.loadTasks

This method is an alias for the grunt.task.loadTasks method.

grunt.loadNpmTasks

This method is an alias for the grunt.task.loadNpmTasks method.

Warnings and fatal errors

grunt.warn

This method is an alias for the grunt.fail.warn method (alias).

grunt.fatal

This method is an alias for the grunt.fail.fatal method ( alias).

Command-line arguments

grunt.option

Retrieves the value of a command line argument, such debug Note That for each command line argument, you can do the opposite test, such no-debug

grunt.option(optionName)

Miscellaneous

grunt.package

package.json the type of object.

grunt.package

grunt.version

The current version of Grunt, the type is a string. It's grunt.package.version property.

grunt.version