Problem/Motivation

The current starterkit generate-theme command does a bit of find-and-replace to update library names/usages, hook implementations, and the .theme/.yml files we expect in all themes, but this potentially leaves behind a lot of other files like breakpoints.yml, layouts.yml, config yml files and usages of the theme name in CSS/JavaScript. We should expand the find/replace to better cover those other files without requiring custom implementations of the postProcess method.

Steps to reproduce

Generate a new theme using olivero as the starterkit. The new theme will still have lots of references to Olivero in file names/contents.

Proposed resolution

We should make use of the symfony Finder and Filesystem modules find files named/using the starterkit's theme name and replace those usages with the new theme's name.

See #3301173: Allow starterkit theme generator tool to clone Olivero and this accompanying MR for an example.

Comments

andy-blum created an issue. See original summary.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andy-blum’s picture

Closing this as duplicate because we're adding this as part of #3364885: Allow themes to use a starterkit.yml file so it is easier to use the theme generator

andy-blum’s picture

Status: Active » Closed (duplicate)