4.2.0 • Published 6 years ago

gulp-hub v4.2.0

Weekly downloads
6,996
License
-
Repository
github
Last release
6 years ago

gulp-hub

Gulp extension to run tasks from multiple gulpfiles.

build status

Basic Usage:

  1. Install gulp-hub:

    $ npm install gulp-hub
  2. Create a gulpfile.js which looks like this:

    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:

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.

4.2.0

6 years ago

4.1.0

7 years ago

0.8.0

8 years ago

0.7.1

9 years ago

0.7.0

9 years ago

0.6.8

9 years ago

0.6.5

9 years ago

0.6.4

9 years ago

0.6.2

9 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.5

10 years ago

0.4.4

10 years ago

0.4.3

10 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago