Skip to content

Commit 0ace8a7

Browse files
author
Daniel Del Core
committed
fix community readme path
1 parent f6abf4f commit 0ace8a7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/docs.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ function cleanTargetDir(targetPath: string) {
1818
if (fs.existsSync(targetPath)) fs.emptyDirSync(targetPath);
1919
}
2020

21-
function getReadme(transformId: string) {
22-
const readmeFilePath = path.join(COMMUNITY_PATH, transformId, 'README.md');
21+
function getReadme(transformSourcePath: string) {
22+
const readmeFilePath = path.join(
23+
COMMUNITY_PATH,
24+
transformSourcePath,
25+
'README.md',
26+
);
2327

2428
const readmeRaw = fs.existsSync(readmeFilePath)
2529
? fs.readFileSync(readmeFilePath, 'utf-8')
@@ -40,7 +44,7 @@ function renderTransform(
4044
packageLink: string,
4145
) {
4246
const seperator = type === 'transform' ? '@' : '#';
43-
const readme = getReadme(`${packageName}/${id}`);
47+
const readme = getReadme(`${packageName}/src/${id}`);
4448
const fallback =
4549
type === 'transform'
4650
? `A codemod which facilitates the migration of the ${packageLink} package to version ${id}.`

0 commit comments

Comments
 (0)