Configure gulp in a separate folder than WordPress theme

I’m setting up gulp to automate our WordPress build process. The current folder structure we use is ClientWebsite/wp(this holds the core files) and then ClientWebsite/wp-content/themes/custom-name/(this holds the custom theme). I would like to keep our gulp in the wp folder as this sits in our git repo and is never changed, but used on every site.

In gulp is there a way to call in the custom-name folder without having to name each client folder in the gulpfile.js file.

For instance:

var sass = require('gulp-sass');
gulp.task('sass', function () {

For the custom-name-for-each-client, is there a way to set up a variable to read what that folder is named when we create a theme folder, so that we don’t have to change it for each client?


Read more here: Configure gulp in a separate folder than WordPress theme

Leave a Reply

Your email address will not be published. Required fields are marked *