question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request: current task data on `this` within gulp.task fn.

See original GitHub issue

I’d like to request some additional data on this within a gulp task’s fn. It would be very useful to have access to the currently running task without having to iterate over the this.tasks hash to find the task with the running: true flag.

Off the cuff, something like one of the following:

  this.task
  this.current
  this.currentTask

  // nvm uses a similar approach with a symlink of @current pointing at the current ver of node used.
  this.tasks.current;

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:26 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
noah79commented, Dec 24, 2016

How can something this basic not be a part of the API? Shit’s crazy, yo.

1reaction
phatedcommented, Dec 26, 2016

@noah79 this has been heavily discussed and we don’t clutter the API with things that can be pushed to the edges (where edge-cases belong). Please refrain from these sorts of comments on the issue tracker, as it just produces more noise.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp: Use output from one task in another task - Stack Overflow
Without a hack solution, using the output from one task in another, would require intermediary storage, like what you are doing with a...
Read more >
task() - gulp.js
Defines a task within the task system. The task can then be accessed from the command line and the series() , parallel() ,...
Read more >
How to use the gulp.tasks function in gulp - Snyk
How to use the gulp.tasks function in gulp. To help you get started, we've selected a few gulp examples, based on popular ways...
Read more >
Using Gulp — ASP.NET documentation
A starter set of Gulp tasks is defined in gulpfile.js. These tasks delete and minify the CSS and JavaScript files. The following JavaScript,...
Read more >
Introduction to Gulp - Jilles Soeters
gulpfile.js · name - This is the name of your task, a string without spaces. · deps - An array with tasks te...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found