blob: 6e6e74637956a072a15037b2615a43d3a6ff27d6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
import fs from 'fs';
const pages = new URL('./project/src/pages/', import.meta.url);
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');
}
|