0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/scripts/memory/mk.js

12 lines
265 B
JavaScript
Raw Normal View History

import fs from 'fs';
const pages = new URL('./project/src/pages/', import.meta.url);
2022-02-18 15:24:55 -05:00
for (let i = 0; i < 100; i++) {
let content = `---
const i = ${i};
---
<span>{i}</span>`;
await fs.promises.writeFile(new URL(`./page-${i}.astro`, pages), content, 'utf-8');
}