LinuxCommandLibrary

grunt

JavaScript task runner for automation

TLDR

Run default task

$ grunt
copy
Run specific task
$ grunt [task-name]
copy
List available tasks
$ grunt --help
copy
Run with verbose output
$ grunt --verbose
copy
Force task completion
$ grunt --force
copy
Initialize Gruntfile
$ grunt-init
copy

SYNOPSIS

grunt [options] [tasks]

DESCRIPTION

Grunt is a JavaScript task runner for automating repetitive tasks. It handles minification, compilation, testing, and linting through a plugin ecosystem.
The tool reads configuration from Gruntfile.js. It was widely used before npm scripts and newer build tools like Gulp and webpack gained popularity.

PARAMETERS

TASKS

Tasks to execute.
-f, --force
Force execution despite warnings.
-v, --verbose
Verbose output.
--no-color
Disable colored output.
--gruntfile FILE
Specify Gruntfile.
--help
Display help information.

CONFIGURATION

Gruntfile.js

Project-level configuration file defining tasks, their options, and execution order.
package.json
Lists Grunt plugins as devDependencies.

CAVEATS

Requires Node.js. Configuration can be verbose. Newer alternatives exist (Gulp, npm scripts).

HISTORY

Grunt was created by Ben Alman in 2012 as one of the first JavaScript task runners.

SEE ALSO

gulp(1), npm(1), webpack(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community