2022-02-18 20:23:47 +00:00
|
|
|
import fs from 'fs';
|
|
|
|
|
2022-06-27 21:47:30 +00:00
|
|
|
const base = new URL('./project/', import.meta.url);
|
|
|
|
const pages = new URL('./src/pages/', base);
|
|
|
|
|
|
|
|
await fs.promises.writeFile(new URL('./package.json', base), `{
|
|
|
|
"name": "@test/smoke",
|
|
|
|
"version": "0.0.0",
|
|
|
|
"private": true,
|
|
|
|
"dependencies": {
|
|
|
|
"astro": "workspace:*"
|
|
|
|
}
|
|
|
|
}`);
|
2022-02-18 20:23:47 +00:00
|
|
|
|
2022-02-18 20:24:55 +00:00
|
|
|
for (let i = 0; i < 100; i++) {
|
2022-02-18 20:23:47 +00:00
|
|
|
let content = `---
|
|
|
|
const i = ${i};
|
|
|
|
---
|
|
|
|
<span>{i}</span>`;
|
|
|
|
await fs.promises.writeFile(new URL(`./page-${i}.astro`, pages), content, 'utf-8');
|
|
|
|
}
|