Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G gulp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gulp
  • gulp
  • Issues
  • #969
Closed
Open
Issue created Mar 18, 2015 by Administrator@rootContributor

Using strings when registering with gulp.task

Created by: jmm

Re: this entry in the changelog:

using strings when registering with gulp.task should only be done when you will call the task with the CLI

A) What is the point of this advice? Is it that you can omit the string (the name arg) to make a task not callable from the CLI?

There was a pretty confusing discussion about that starting here.

Will this be callable via the CLI (gulp whatever)?:

gulp.task(function whatever () {});

// As opposed to
gulp.task('whatever', function () {});

B) The API documentation for .task() should discuss this, right?

C) It looks like it will be an error to do gulp.task(function () { "I'm anonymous"; }), but if so the documentation doesn't make that clear.

D) Is displayName meant to be part of the API or it's just for some internal use?

var f = function () {};
f.displayName = 'whatever';
gulp.task(f);
Assignee
Assign to
Time tracking