# gulp-hub

> A gulp plugin to run tasks from multiple gulpfiles

Latest version **4.2.0** (published 2017-12-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-hub
pnpm add gulp-hub
yarn add gulp-hub
bun add gulp-hub
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.2.0 |
| Published | 2017-12-31 |
| First published | 2014-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 90 |
| Author | Frank Wallis |
| Maintainers | frankwallis |
| Keywords | gulp, hub, grunt-hub, gulp-chug, multi, gulpregistry, glob, forward reference |

## Links

- npm: https://www.npmjs.com/package/gulp-hub
- Repository: https://github.com/frankwallis/gulp-hub
- Issues: https://github.com/frankwallis/gulp-hub/issues
- npm.io page: https://npm.io/package/gulp-hub

## Dependencies (8)

- [fwd](https://npm.io/package/fwd.md) ^0.2.2
- [glob](https://npm.io/package/glob.md) ^7.1.1
- [callsite](https://npm.io/package/callsite.md) ^1.0.0
- [fancy-log](https://npm.io/package/fancy-log.md) ^1.3.2
- [ansi-colors](https://npm.io/package/ansi-colors.md) ^1.0.1
- [lodash.foreach](https://npm.io/package/lodash.foreach.md) ^4.0.0
- [lodash.isstring](https://npm.io/package/lodash.isstring.md) ^4.0.0
- [undertaker-forward-reference](https://npm.io/package/undertaker-forward-reference.md) ^1.0.0

## Recent versions

- 4.2.0 (latest) — 2017-12-31
- 4.1.0 — 2017-02-26
- 0.8.0 — 2016-06-17
- 0.7.1 — 2015-07-26
- 0.7.0 — 2015-01-10
- 0.6.8 — 2015-01-09
- 0.6.5 — 2015-01-09
- 0.6.4 — 2015-01-09
- 0.6.2 — 2014-12-06
- 0.6.1 — 2014-08-05
- 0.6.0 — 2014-08-01
- 0.5.1 — 2014-06-14
- 0.5.0 — 2014-06-14
- 0.4.5 — 2014-06-13
- 0.4.4 — 2014-06-13
- … 12 more at https://npm.io/package/gulp-hub/versions

## README

# gulp-hub

> [Gulp](http://gulpjs.com/) extension to run tasks from multiple gulpfiles.

[![build status](https://secure.travis-ci.org/frankwallis/gulp-hub.png?branch=4.0)](http://travis-ci.org/frankwallis/gulp-hub)

Basic Usage:

1. Install gulp-hub:

    ```sh
    $ npm install gulp-hub
    ```

2. Create a gulpfile.js which looks like this:

    ```js
    var gulp = require('gulp');
    var HubRegistry = require('gulp-hub');

    /* load some gulpfiles into the registry */
    var hub = new HubRegistry(['./project1/gulpfile.js', './project1/gulpfile.js']);

    /* tell gulp to use the tasks just loaded */
    gulp.registry(hub);
    ```

3. Run `gulp [taskname]`

Gulp will execute [taskname] in all of the gulpfiles.

More Details:

HubRegistry constructor accepts glob patterns.
Tasks registered in the same gulpfile from which gulp-hub is called will be included.
If one of the child gulpfiles also uses HubRegistry then that is handled too.

Use gulp --tasks to view the task tree:
   ```sh
   gulp --tasks

   gulp-hub/examples$ gulp --tasks
   [15:56:21] Loading /Users/frank/work/gulp-hub/examples/project1/gulpfile.js
   [15:56:21] Loading /Users/frank/work/gulp-hub/examples/project1/project1A/gulpfile.js
   [15:56:21] Loading /Users/frank/work/gulp-hub/examples/project1/project1B/gulpfile.js
   [15:56:21] Loading /Users/frank/work/gulp-hub/examples/project2/gulpfile.js
   [15:56:21] Tasks for ~/work/gulp-hub/examples/gulpfile.js
   [15:56:21] ├─┬ build
   [15:56:21] │ └─┬ <series>
   [15:56:21] │   ├─┬ /Users/frank/work/gulp-hub/examples/project1/gulpfile.js-build
   [15:56:21] │   │ └─┬ build
   [15:56:21] │   │   └─┬ <series>
   [15:56:21] │   │     ├─┬ /Users/frank/work/gulp-hub/examples/project1/project1A/gulpfile.js-build
   [15:56:21] │   │     │ └─┬ build
   [15:56:21] │   │     │   └─┬ <series>
   [15:56:21] │   │     │     ├── precompile
   [15:56:21] │   │     │     └── compile1A
   [15:56:21] │   │     ├─┬ /Users/frank/work/gulp-hub/examples/project1/project1B/gulpfile.js-build
   [15:56:21] │   │     │ └─┬ build
   [15:56:21] │   │     │   └─┬ <series>
   [15:56:21] │   │     │     ├── precompile
   [15:56:21] │   │     │     └── compile
   [15:56:21] │   │     └─┬ /Users/frank/work/gulp-hub/examples/project1/gulpfile.js-internal-build
   [15:56:21] │   │       └─┬ build
   [15:56:21] │   │         └─┬ <series>
   [15:56:21] │   │           ├── precompile
   [15:56:21] │   │           └── compile
   [15:56:21] │   ├─┬ /Users/frank/work/gulp-hub/examples/project2/gulpfile.js-build
   [15:56:21] │   │ └─┬ build
   [15:56:21] │   │   └─┬ <series>
   [15:56:21] │   │     ├── precompile
   [15:56:21] │   │     └── compile
   [15:56:21] │   └─┬ /Users/frank/work/gulp-hub/examples/gulpfile.js-internal-build
   [15:56:21] │     └─┬ build
   [15:56:21] │       └─┬ <series>
   [15:56:21] │         ├── precompile
   [15:56:21] │         └── compile
   ```

See the example project for more advanced examples.

---
_Source: https://npm.io/package/gulp-hub · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
