From f846fc9b60d04a755bb6bc10faa213144416fb9f Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Mon, 27 Jun 2022 17:47:30 -0400 Subject: [PATCH] refactor: write smoke package.json programmatically --- scripts/memory/mk.js | 12 +++++++++++- scripts/memory/project/package.json | 8 -------- 2 files changed, 11 insertions(+), 9 deletions(-) delete mode 100644 scripts/memory/project/package.json diff --git a/scripts/memory/mk.js b/scripts/memory/mk.js index ae14e1191587..44cbe52778f7 100644 --- a/scripts/memory/mk.js +++ b/scripts/memory/mk.js @@ -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 = `--- diff --git a/scripts/memory/project/package.json b/scripts/memory/project/package.json deleted file mode 100644 index 6fff9ac81915..000000000000 --- a/scripts/memory/project/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@test/smoke", - "version": "0.0.0", - "private": true, - "dependencies": { - "astro": "workspace:*" - } -}