Skip to content

Commit

Permalink
fix(core/windows-doc-generation): fix for component-doc generation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiashader committed Feb 8, 2024
1 parent 7698c64 commit 39d88a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const config: Config = {

fs.writeFileSync(
'component-doc.json',
JSON.stringify(patchedJson, null, 2).replace(/(?:\\[r])+/g, '')
JSON.stringify(patchedJson, null, 2)
);
},
},
Expand All @@ -163,7 +163,8 @@ function normalizeProperties(obj: JsonDocs, deleteProps: string[]) {
if (obj[key] && typeof obj[key] === 'object') {
normalizeProperties(obj[key], deleteProps);
} else if (deleteProps.includes(key)) {
obj[key] = path.relative(__dirname, obj[key]);
const posixPath = path.join(...path.relative(__dirname, obj[key]).split(path.sep)).toString();
obj[key] = posixPath.replace(/\\/g, '/');
}
}

Expand Down

0 comments on commit 39d88a6

Please sign in to comment.