Problem/Motivation

Gulp is not developed any more - last release 4.0.2 happened in 2019. We should switch to something else.

Bootstrap 5 is using npm scripts - https://getbootstrap.com/docs/5.2/getting-started/contribute/#tooling-setup.

There are other newer build tools like:

- Parcel
- Webpack

Check https://github.com/postcss/postcss for more info about possible newer popular build tools.

Consider doing more research before starting with this.

Replacing gulp build process will be not that easy because of custom gulp-options.yml and SASS import compilation support for parent themes.

Comments

pivica created an issue. See original summary.

pivica’s picture

Gulp has some registry system for better use/sharing of tasks, worth of checking https://gulpjs.com/docs/en/advanced/creating-custom-registries/.

pivica’s picture

Drupal 10 switched to postcss in core themes with some simple js scripts that are executed with node from package.json with.

Still I don't like fully just postcss approach, it is great for autoprefixer support and other similar stuff, but sass still looks much better.

For now I think the best options are:

  • try not to complicate stack more, so avoid webpack and other things for now
  • use sass dart implementation
  • start adding css variables which are supported by sass variables
  • use postcss the same as we are using it now
  • replace gulp with custom js code for compiling and building css - basically we need to replace current build-css task "npx gulp clean:css && npx gulp sass" with something else
  • use package.json scripts (as we are doing now) to execute various tasks