Skip to content

Commit

Permalink
Update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Apr 12, 2024
1 parent 6769942 commit 152625b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions benchmark/make-project/memory-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ ${loremIpsum}
);
}

for (let i = 0; i < 100; i++) {
const content = `\
# Post ${i}
${loremIpsum}
`;
promises.push(
fs.writeFile(new URL(`./src/content/blog/post-${i}.mdx`, projectDir), content, 'utf-8')
);
}

await fs.writeFile(
new URL(`./src/pages/blog/[...slug].astro`, projectDir),
`\
Expand All @@ -56,4 +67,16 @@ const { Content } = await entry.render();
);

await Promise.all(promises);

await fs.writeFile(
new URL('./astro.config.js', projectDir),
`\
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
export default defineConfig({
integrations: [mdx()],
});`,
'utf-8'
);
}

0 comments on commit 152625b

Please sign in to comment.