Git Product home page Git Product logo

Comments (2)

phated avatar phated commented on July 25, 2024 7

custom registries are a very advanced feature. You probably don't want to be using them.

from undertaker.

ginnsquad avatar ginnsquad commented on July 25, 2024 2

@stefanstranger I ran into this error as well. I am not sure how your folder structure is setup but here is mine:

gulpfile.js
  |- gulp/
    |- default.js
    |- tasks/
      |- styles.js
      |- scripts.js
      |- clean.js

In my gulpfile.js, I have defined the HubRegistry as instructed on https://github.com/frankwallis/gulp-hub/.

var gulp        = require("gulp");
var HubRegistry = require("gulp-hub");

// Load main tasks in gulp/
var hub = new HubRegistry(["./gulp/default.js"]);

// Tell gulp to use the tasks just loaded
gulp.registry(hub);

Then in my default.js, I have

var HubRegistry = require("gulp-hub");

// Load all other gulp tasks in tasks/
var hub = new HubRegistry(["./tasks/*.js"]);

// Tell gulp to use the tasks just loaded
gulp.registry(hub);

The problem was how the Gulp tasks were being exposed in style.js or any other Gulp task file I was trying to load. At first I was using CommonJS like this and getting the same error as you:

exports.styles = styles;

So I changed those to Gulp tasks and it worked:

gulp.task("styles", styles);

FYI - I am using Gulp 4.0 so I had also installed the latest branch of gulp-hub so I'm not sure if that will make any difference. You can install it by running npm i --save-dev gulp-hub@frankwallis/gulp-hub#4.1.0.

from undertaker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.