refactor: write smoke package.json programmatically
This commit is contained in:
parent
e72040ab46
commit
2c23e8cc0d
2 changed files with 11 additions and 9 deletions
|
@ -1,6 +1,16 @@
|
||||||
import fs from 'fs';
|
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++) {
|
for (let i = 0; i < 100; i++) {
|
||||||
let content = `---
|
let content = `---
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@test/smoke",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"private": true,
|
|
||||||
"dependencies": {
|
|
||||||
"astro": "workspace:*"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue