fix: simplify file

This commit is contained in:
Jiralite
2025-09-06 23:40:37 +01:00
parent 48ac00aa8e
commit 9456702aed
2 changed files with 23 additions and 65 deletions

View File

@@ -71,12 +71,12 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
type: 'modify',
path: `${plop.getDestBasePath()}/../../.github/labeler.yml`,
transform(content, answers) {
const labelerYAML = parseYAML(content) as Record<string, Record<string, Record<string, string[]>[]>[]>;
const labelerYAML = parseYAML(content) as Record<string, Record<string, Record<string, string>[]>[]>;
labelerYAML[`packages:${answers.name}`] = [
{
'changed-files': [
{ 'any-glob-to-any-file': [`packages/${answers.name}/*`, `packages/${answers.name}/**/*`] },
{ 'any-glob-to-any-file': `packages/${answers.name}/**/*` },
],
},
];