- Issue created by @mradcliffe
- πΊπΈUnited States mradcliffe USA
I think the YAML configuration would be something like this where a theme might want to make use of values provided by the InputConfigurator.
input: theme_name: data_type: string constraints: NotBlank: [] prompt: method: ask default: source: value value: 'my_theme' config: theme: - name: my_theme #name: '${theme_name}' description: 'A description of your theme.' enable: true starterkit: 'starterkit_theme' path: 'themes/custom'
Much of theme generation is in GenerateTheme command, which may be better someplace else in core.
- πΊπΈUnited States mradcliffe USA
From @mglaman, potential things that may need to be done as part of this:
- Core should expose a way to do batch API over CLI. Basically what Drush has for it as a proper API
- Extract command to a service that uses batch, command basically runs that batch
- Allows recipe runner to use that batch for the theme generation
- First commit to issue fork.
- πΊπΈUnited States mglaman WI, USA
I think this should be a series of issues, but going for a "big bang" fix just to prove its possible.
- πΊπΈUnited States mglaman WI, USA
I started working on this and realized that it will cause a whole bunch of internal things needing to be exposed as public static methods and also cause us to lose some of the verbosity output when generating a command.
There is also another issue if the spun out code uses TranslatableMarkup because it requires a container and the GenerateTheme command was made specifically to work without an installed Drupal site.
- πΊπΈUnited States mglaman WI, USA
In an interim I wonder if we can just add `theme` as proposed and in \Drupal\Core\Recipe\RecipeRunner::toBatchOperationsRecipe we had a matching method which runs the command over CLI. The biggest problem would be timeouts since we cannot batch it into smaller operations. Is that acceptable?