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

Grunt uses command-line tools


May 25, 2021 Grunt


Table of contents


Use the command line tool

Install the command line tool

Perform sudo npm install -g grunt-cli

grunt command-line interface provides a range of options. You can use grunt -h to view this option.

--help, -h

Show help information.

--base, -b

Specify a base path. By default, all file paths are Gruntfile

You can grunt.file.setBase(...)

--no-color

Disable color output.

--gruntfile

Specify Gruntfile file.

By default, grunt looks for the most recent Gruntfile file or Gruntfile.js the current Gruntfile.coffee

--debug, -d

Enable debug mode for tasks that support debugging.

--stack

Print stack trace information when exiting due to a warning or fatal error.

--force, -f

A way to force a skip of warning messages.

If you get a prompt from a warning, don't use this option and you can fix the code based on the prompt information.

--tasks

Specify a directory that contains loadable tasks and "extra" files.

You can grunt.loadTasks(...)

--npm

Check for any additional files that can be loaded in plug-ins installed through npm.

You can grunt.loadNpmTasks(...)

--no-write

Disable write-to-file operations, which can be used for demonstrations.

--verbose, -v

Long mode (Verbose mode). A lot of information is output.

--version, -V

Print the grunt version. Use with --verbose for more information.

--completion

Output shell auto-complement rules. For more information, refer to the grunt-cli-related documentation.