Viewing Gulp tasks from the command line

March 24, 2016, 7:03 pm
Author: James Griffiths

There's no denying that front-end development workflow has been improved greatly with tasks runners such as Grunt and Gulp.

Here's a nice little tip on being able to view all Gulp related tasks directly from the command line...

In your console, while in the same directory/location where your Gulp file is located, type the following command:

gulp --tasks

Which will produce output in a tree-like format akin to the following:

Tasks for /path-to-your-gulpfile-directory-here/gulpfile.js
[13:06:59] ├── CustomStyles
[13:06:59] ├── Images
[13:06:59] ├── InternetExplorerPlugins
[13:06:59] ├── Lint
[13:06:59] ├── Plugins
[13:06:59] ├── Scripts
[13:06:59] ├── ThirdPartyStyles
[13:06:59] ├── UpgradeStyles
[13:06:59] ├─┬ default
[13:06:59] │ ├── CustomStyles
[13:06:59] │ ├── UpgradeStyles
[13:06:59] │ ├── ThirdPartyStyles
[13:06:59] │ ├── Lint
[13:06:59] │ ├── Scripts
[13:06:59] │ ├── Plugins
[13:06:59] │ ├── InternetExplorerPlugins
[13:06:59] │ ├── jsDocumentation
[13:06:59] │ └── sassDocumentation
[13:06:59] ├── jsDocumentation
[13:06:59] ├── sassDocumentation
[13:06:59] ├── ttf2eot
[13:06:59] └── ttf2woff

Alternatively you can print a simple list of tasks with the following command instead:

gulp --tasks-simple

Which will produce output akin to the following:

CustomStyles
UpgradeStyles
ThirdPartyStyles
sassDocumentation
Lint
Scripts
Plugins
InternetExplorerPlugins
jsDocumentation
Images
ttf2eot
ttf2woff
default

For more information on the Gulp command line options available simply type out the following in your console:

gulp --help

Categories

« Return to Posts

Post a comment

All comments are welcome and the rules are simple - be nice and do NOT engage in trolling, spamming, abusiveness or illegal behaviour. If you fail to observe these rules you will be permanently banned from being able to comment.