LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

grunt

JavaScript task runner for automation

TLDR

Run default task
$ grunt
copy
Run specific task
$ grunt [task-name]
copy
Run multiple tasks in sequence
$ grunt [task-one] [task-two]
copy
List available tasks and options
$ grunt --help
copy
Run with verbose output
$ grunt --verbose
copy
Force execution despite warnings
$ grunt --force
copy
Use an alternate Gruntfile
$ grunt --gruntfile [path/to/Gruntfile.js] [task-name]
copy
Perform a dry run without writing files
$ grunt --no-write
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. The globally-installed grunt-cli package provides the grunt command itself; it just locates and runs the version of Grunt installed locally in the project, which is what actually loads the Gruntfile and plugins. Grunt was widely used before npm scripts and newer build tools like Gulp and webpack gained popularity.

PARAMETERS

TASKS

Tasks to execute, in order. Runs the default task if none is given.
-f, --force
Continue past warnings instead of aborting.
-v, --verbose
Verbose mode, printing more information about what Grunt is doing.
-b, --base PATH
Alternate base path; file paths are relative to the Gruntfile by default.
--no-color
Disable colored output.
--gruntfile FILE
Specify an alternate Gruntfile.
--no-write
Disable writing files (dry run).
-d, --debug
Enable debugging mode for tasks that support it.
--stack
Print a stack trace when exiting with a warning or fatal error.
-V, --version
Print the Grunt version; combine with --verbose for plugin versions too.
--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.

INSTALL

brew install grunt
copy

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)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid