Skip to content

how could i start gulp tasks programmatically? #2672

Answered by phated
zzzgit asked this question in Help
Discussion options

You must be logged in to vote

Tasks are just functions. If you do this:

const task = parallel(foo, bar);
console.log(task);

You'll see it is a function. You can just call it!

const task = parallel(foo, bar);
task()

These are referred to as "private tasks" in https://gulpjs.com/docs/en/getting-started/creating-tasks

A private task looks and acts like any other task, but an end-user can't ever execute it independently. To register a task publicly, export it from your gulpfile.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by phated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants