How to get the available tasks list in gulp

31,297

Solution 1

Yes I got it use the gulp --tasks in command then it display the tasks list.

Solution 2

gulp --tasks-simple

This command print a plaintext list of tasks. My local project:

~ gulp --tasks-simple
clean
default

From gulp CLI documentation:

~ gulp --version
[03:00:05] CLI version 1.2.1
[03:00:05] Local version 4.0.0-alpha.2
~ gulp --help | grep 'tasks-simple'
  --tasks-simple   Print a plaintext list of tasks for the loaded gulpfile. [boolean]

Solution 3

Another possibility is to use gulp-help-doc module, which provides possibility to print usage information based on jsDoc-like comments in a gulpfile. Currently it also supports TypeScript as well. The benefit is that you simply commenting your code without changing gulp API and you have usage info in command-line as well.

Solution 4

you can also use this plugin gulp-task-listing. It gives the main-tasks and sub-tasks list

Solution 5

As an alternative you can write detailed documentation to your tasks in js comments using gulp-task-doc

Share:
31,297
vamsikrishnamannem
Author by

vamsikrishnamannem

I am working as a Full-stack developer

Updated on June 03, 2021

Comments

  • vamsikrishnamannem
    vamsikrishnamannem almost 3 years

    Hi Previously I used the grunt in that I want to know the available tasks use grunt --help. But same as in gulp use gulp --help it doesn't show. What is the command to know the available tasks list in gulp