Skip to content

Commit

Permalink
chore: keep guides for docs close to snippets (#3354)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Jul 12, 2024
1 parent 9ec65cf commit 258df91
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/ci/codegen/pushToAlgoliaDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function pushToAlgoliaDoc(): Promise<void> {
await run(`cp ${toAbsolutePath('specs/bundled/README.md')} ${pathToSpecs}`);
await run(`cp ${toAbsolutePath('specs/bundled/*.doc.yml')} ${pathToSpecs}`);
await run(`cp ${toAbsolutePath('config/release.config.json')} ${pathToSpecs}`);
await run(`cp ${toAbsolutePath('website/src/generated/*.json')} ${pathToSpecs}`);
await run(`cp ${toAbsolutePath('snippets/guides/*.json')} ${pathToSpecs}`);

if ((await getNbGitDiff({ head: null, cwd: tempGitDir })) === 0) {
console.log(`❎ Skipping push docs because there is no change.`);
Expand Down
5 changes: 1 addition & 4 deletions scripts/specs/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ export async function transformBundle({
toAbsolutePath(`website/src/generated/${clientName}-snippets.js`),
`export const snippets = ${snippets}`,
);
await fsp.writeFile(
toAbsolutePath(`website/src/generated/${clientName}-snippets.json`),
snippets,
);
await fsp.writeFile(toAbsolutePath(`snippets/guides/${clientName}-snippets.json`), snippets);
}

for (const [pathKey, pathMethods] of Object.entries(bundledSpec.paths)) {
Expand Down
Empty file added snippets/guides/.gitkeep
Empty file.

0 comments on commit 258df91

Please sign in to comment.