14
Apr.2026
One Gulp File to Rule Them All: Centralized CSS Compilation for Drupal Custom Themes and Modules
A single `gulpfile.js` at the Drupal project root can replace the common pattern of maintaining separate build files in every custom theme and module directory. Using Node's `fs` module, the file auto-discovers any custom module that contains an `assets/scss/` directory and compiles it alongside the theme — all driven by a minimal, git-ignored `config.local.js` that each developer fills in once. The result is one `npm install`, one `gulp watch`, and one place to update dependencies for the entire project.