fix: properly create index

This commit is contained in:
iCrawl
2023-11-13 19:13:32 +01:00
parent bc8f83368a
commit 81a892e27f
5 changed files with 5 additions and 11 deletions

View File

@@ -3,13 +3,9 @@ import { generateAllIndices } from '@discordjs/scripts';
console.log('Generating all indices...');
await generateAllIndices({
fetchPackageVersions: async (pkg) => {
console.log(`Fetching versions for ${pkg}...`);
return ['main'];
},
fetchPackageVersionDocs: async (pkg, version) => {
console.log(`Fetching data for ${pkg} ${version}...`);
return JSON.parse(await readFile(`${process.cwd()}/../../packages/${pkg}/docs/docs.api.json`, 'utf8'));
return JSON.parse(await readFile(`${process.cwd()}/../../../docs/${pkg}/${version}.api.json`, 'utf8'));
},
});
console.log('Generated all indices.');