refactor: write smoke package.json programmatically

This commit is contained in:
bholmesdev 2022-06-27 17:47:30 -04:00
parent e72040ab46
commit 2c23e8cc0d
2 changed files with 11 additions and 9 deletions

View file

@ -1,6 +1,16 @@
import fs from 'fs';
const pages = new URL('./project/src/pages/', import.meta.url);
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:*"
}
}`);
for (let i = 0; i < 100; i++) {
let content = `---

View file

@ -1,8 +0,0 @@
{
"name": "@test/smoke",
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "workspace:*"
}
}