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.

Recipe (gulp 4): using gulp-hub as a custom registry for loading multiple gulpfiles

See original GitHub issue

gulp-hub has been great at working with me to implement itself as a custom registry in support of gulp4. I really would like a recipe showing how to load multiple gulpfiles with gulp-hub as the registry.

Docs: https://github.com/frankwallis/gulp-hub/tree/4.0

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
bradcerasanicommented, Apr 13, 2015

@phated Just tried a stripped down example explicitly ordering the tasks passed to gulp-hub, but build still doesn’t recognize the clean task as ever being defined (despite loading before it):

screen shot 2015-04-13 at 00 14 38

Even if it did work, manually declaring each filename and their order in the array passed to gulp-hub is a bit meticulous. I don’t see this as a problem with gulp-hub specifically (it does what it claims to), but rather gulp-hub as a replacement to the previous require-dir recipe for splitting tasks across multiple files.

Let me know if I should open a separate issue here - not sure if I’m doing something wrong but I’m happy to help update this recipe once sorted.

1reaction
mryellowcommented, Mar 25, 2019

We want to promote gulp-hub as the way to do this

It’s not meeting the functional requirements. Should only have to specify the task directory and have those tasks accessible from that point forward. Current implementation breaks down when it comes to nesting, at which point you’d be once again specifying each set of task dependencies for each file. Issue being that these dependencies are already clearly defined in the tasks themselves and using gulp-hub as it stands would result in double-handling with these being defined multiple times.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp 4 Split Tasks Across Multiple Files Using Gulp-Hub ...
The 4.0 branch doesn't work right now because it fails the registry validation of undertaker . The registry-init branch seems to work however....
Read more >
How to use the gulp.registry function in gulp
To help you get started, we've selected a few gulp.registry examples, ... Tell gulp to use the tasks just loaded gulp.registry(hub); gulp.task('build', ...
Read more >
docs/recipes/split-tasks-across-multiple-files.md - gulp
If your gulpfile.js is starting to grow too large, you can split the tasks into separate files by using the gulp-hub module as...
Read more >
Creating Tasks
Private tasks are made to be used internally, usually used as part of series() or parallel() ... To register a task publicly, export...
Read more >
Gulp-hub
gulp-hub v4.2.0 ... gulp-hub. Gulp extension to run tasks from multiple gulpfiles. ... tell gulp to use the tasks just loaded */ gulp.registry(hub);....
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