Skip to content

Commit 9d57c13

Browse files
authored
Merge pull request #2360 from patternfly/fix/tools/cem-demos
fix(tools): find demos
2 parents 775252b + 3035d91 commit 9d57c13

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/tools-analyzer-demos.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@patternfly/pfe-tools": patch
3+
---
4+
5+
analyzer: find demos in different repo setups

tools/pfe-tools/custom-elements-manifest/demos.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function demosPlugin(options?: PfeConfig): Plugin {
3636
: x.declarations.flatMap(y => (y as { tagName: string }).tagName)).filter(Boolean);
3737

3838
for (const moduleDoc of customElementsManifest.modules) {
39-
const [primaryElementName] = moduleDoc.path.split(sep);
39+
const primaryElementName = moduleDoc.path.split(sep).find(x => x !== 'elements') ?? '';
4040
let demoPath = join(rootDir, primaryElementName, 'demo');
4141

4242
if (!existsSync(demoPath)) {

0 commit comments

Comments
 (0)