Skip to content

Commit 787ea3f

Browse files
committed
fix(tools): hard-code "elements" path into demos
we'll eventually remove this helper altogether
1 parent 35b5d8b commit 787ea3f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/moody-corners-help.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
"@patternfly/pfe-tools": patch
3+
---
4+
Fix the manifest helper's demo `filePath` field.

tools/pfe-tools/custom-elements-manifest/lib/Manifest.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,11 @@ export class Manifest {
314314
// strict removes all special characters from slug
315315
slug = slugify(slug, { strict: true, lower: true });
316316
const primaryElementName = deslugify(slug, options.rootDir);
317-
const filePath = demo.source?.href.replace(options.sourceControlURLPrefix, `${options.rootDir}/`) ?? '';
317+
const filePath =
318+
demo.source?.href.replace(
319+
options.sourceControlURLPrefix,
320+
`${join(options.rootDir, options.elementsDir)}/`,
321+
) ?? '';
318322
const [last = ''] = filePath.split('/').reverse();
319323
const filename = last.replace('.html', '');
320324
const isMainElementDemo = this.getTagNames().includes(filename);

0 commit comments

Comments
 (0)