I create a lot of WordPress plugins, each of these all follow the same folder structure and all use Gulp to handle their SASS / JS assets.
Folder Structure is as follows:
|-- .gulpfile.js
|-- lsmwp-one
|-- plugin.php
|-- assets
|-- src
|-- style.scss
|-- dist
|-- lsmwp-two
|-- plugin.php
|-- assets
|-- src
|-- style.scss
|-- dist
I would like to have a single Gulpfile that watches each 'lsmwp-*' folder, runs all related tasks and outputs to plugin dist folder.
My Gulpfile currently watches these folders but I am having trouble setting the dest location. Any help would be appreciated.
var pluginSrc = 'wp-content/plugins/lsmwp-*/assets/src/style.scss';
gulp.task('lsmwp-plugins', () => {
gulp.src( pluginSrc )
.pipe(sass())
.pipe(concat('style.min.css'))
.pipe(autoprefixer())
.pipe(cssmin())
.pipe(gulp.dest(); // Stuck here...
});