May 25, 2021 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.
This method is an alias (alias) for the grunt.config.init method.
This method is an alias (alias) for the grunt.task.registerTask method.
This method is an alias (alias) of the grunt.task.registerMultiTask method.
This method is an alias (alias) of the grunt.task.renameTask method.
This method is an alias for the grunt.task.loadTasks method.
This method is an alias for the grunt.task.loadNpmTasks method.
This method is an alias for the grunt.fail.warn method (alias).
This method is an alias for the grunt.fail.fatal method ( alias).
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)
package.json
the type of object.
grunt.package
The current version of Grunt, the type is a string.
It's
grunt.package.version
property.
grunt.version