frankwallis / gulp-hub

Gulp plugin to run tasks in multiple gulpfiles
MIT License
89 stars 24 forks source link

Does gulp-hub work with symlinks? #30

Open cibulka opened 8 years ago

cibulka commented 8 years ago

Hello, thanks for your work on gulp-hub!

Does gulp-hub work with symlinked Gulpfiles though? My setup:

/web
|-- gulpfile.js                    // gulp-hub called pointing to lib1/gulpfile.js and lib2/gulpfile.js, no css task
|-- /lib1
|-- |-- gulpfile.js -> node_modules/my-gulp-tasks/gulpfile.js
|-- |-- /node_modules
|-- |-- |-- /my-gulp-tasks
|-- |-- |-- |-- gulpfile.js      // here is css task
|-- /lib2
|-- |-- gulpfile.js -> node_modules/my-gulp-tasks/gulpfile.js    // has css task defined
|-- |-- /node_modules
|-- |-- |-- /my-gulp-tasks
|-- |-- |-- |-- gulpfile.js      // here is css task

Output of gulp css command:

| => gulp css
[16:52:16] Loading web/lib1/gulpfile.js
[16:52:36] Loading web/lib2/gulpfile.js
[16:52:38] Using gulpfile ~/Web/gulpfile.js
[16:52:38] Task 'css' is not in your gulpfile
[16:52:38] Please check the documentation for proper gulpfile formatting

If I just copy-paste my Gulpfile to lib1 folder, gulp-hub seem to work as expected.

Reasoning behind symlinks: My gulpfile setup is quite complex and pretty much the same for each lib. Because of that, I've decided to pull it to a separate NPM package. Symlinks to gulpfiles are created as a part of Node installation script.

Is that expected behaviour or did I do something wrong? Thanks in advance!