Using Gulp JS in multiple theme development I use Gulp JS in my themes but the issue I'm having is we work on many themes in our drupal site (sometimes up to 40!).

I want to avoid repeating the same "node_modules", "gulpfile.js" and "package.json" files in every single theme. If we want to change 1 of those files, we would have to update each file in every theme across all sites which is going to get too messy.

I would like to have the Gulp files live in sites/all/libraries and have gulp watch my theme that I'm working on. 

To anyone experienced with Gulp, any idea's on how this can work?

Edit:


I have moved the 2 gulp files &amp; node_modules folder into /sites/all/libraries/gulp
I have edited gulp.js to point to the theme I'm working on, code is below (I have tried a few different combinations including an absolute path):


gulp.task('less', function() {
  gulp.src('../themes/theme_name/css/style.less') 

When I type gulp in the command line in my theme directory I get this error:

Local gulp not found in /var/www/site_name/sites/all/themes/theme_name

If I go into sites/all/libraries/gulp, type gulp in the command line, the gulp process starts, but if I edit a Less file and save it, gulp doesn't compile the css.

Thank You
I have finally found the best solution for this so I'm posting it incase anyone has a similar issue:


Add gulp (package.json, gulpfile.js &amp; node_modules) to a centralized location (eg: sites/all/libraries/gulp)  
In the root of each theme, create 3 symbolic links that point to gulpfile.js, package.json and node_modules