summaryrefslogtreecommitdiff
path: root/benchmark/make-project/markdown-cc1.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/make-project/markdown-cc1.js')
-rw-r--r--benchmark/make-project/markdown-cc1.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/benchmark/make-project/markdown-cc1.js b/benchmark/make-project/markdown-cc1.js
index 6c8395960..1e3aaa517 100644
--- a/benchmark/make-project/markdown-cc1.js
+++ b/benchmark/make-project/markdown-cc1.js
@@ -8,11 +8,13 @@ export async function run(projectDir) {
await fs.rm(projectDir, { recursive: true, force: true });
await fs.mkdir(new URL('./src/pages/blog', projectDir), { recursive: true });
await fs.mkdir(new URL('./src/content/blog', projectDir), { recursive: true });
- await fs.copyFile(new URL('./image.jpg', import.meta.url), new URL('./src/image.jpg', projectDir));
+ await fs.copyFile(
+ new URL('./image.jpg', import.meta.url),
+ new URL('./src/image.jpg', projectDir),
+ );
const promises = [];
-
for (let i = 0; i < 10000; i++) {
const content = `\
# Article ${i}
@@ -24,11 +26,10 @@ ${loremIpsumMd}
`;
promises.push(
- fs.writeFile(new URL(`./src/content/blog/article-${i}.md`, projectDir), content, 'utf-8')
+ fs.writeFile(new URL(`./src/content/blog/article-${i}.md`, projectDir), content, 'utf-8'),
);
}
-
await fs.writeFile(
new URL(`./src/pages/blog/[...slug].astro`, projectDir),
`\
@@ -46,7 +47,7 @@ const { Content } = await entry.render();
<h1>{entry.data.title}</h1>
<Content />
`,
- 'utf-8'
+ 'utf-8',
);
await Promise.all(promises);
@@ -58,6 +59,6 @@ import { defineConfig } from 'astro/config';
export default defineConfig({
});`,
- 'utf-8'
+ 'utf-8',
);
}