- Issue created by @fskreuz
One cannot exclude dotfiles from a starterkit theme.
The use case: We have a starterkit theme from a private repo composer dependency that comes with a lot of dot files for development (eslintrc, stylelintrc, nvmrc, etc.). On project startup, we generate a theme off of this starterkit theme and don't want any of those files as the project-level dotfiles will cover the tooling configuration.
The issue: The .starterkit.yml
's ignore
works fine on regular files. But it fails on dotfiles. 3456699 fixed this by adding ignoreDotFiles(FALSE)
to the Finder
instance used. However, on line 118, GenerateTheme::loadStarterKitConfig
calls GenerateTheme::createFilesFinder
which creates a Finder
instance that doesn't ignoreDotFiles(FALSE)
. When GenerateTheme::loadStarterKitConfig
validates its config, it omits all the dotfiles from ignore
.
Was tested in D10.4 but the affected code remained the same on 11.x.
1. Install Drupal.
2. Create a starterkit theme that includes an .eslintrc
and .stylelintrc
.
3. In the .starterkit.yml
file of this theme, add .stylelintrc
to ignore
.
Expected:
When drupal generate-theme
is used on this starterkit, .stylelintrc
is ignored. Only .eslintrc
is copied over.
Actual:
Both .eslintrc
and .stylelintrc
are copied over.
- Make GenerateTheme::createFilesFinder
include all files.
- Make GenerateTheme::execute
also use GenerateTheme::createFilesFinder
, for consistency.
- Verify if all existing usages won't break.
- Merge request
- Test
- Review
- self::createFilesFinder
will start including dotfiles.
Active
11.0 π₯
Starterkit theme