From e37c449b158729e56d5d327ae0e9e3b7bbbe705b Mon Sep 17 00:00:00 2001 From: suhaotian Date: Fri, 15 Nov 2024 13:53:18 +1100 Subject: [PATCH] Fix --- scripts/replace-files-for-deno.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/replace-files-for-deno.mjs b/scripts/replace-files-for-deno.mjs index cecd953..209c7ef 100644 --- a/scripts/replace-files-for-deno.mjs +++ b/scripts/replace-files-for-deno.mjs @@ -6,15 +6,15 @@ async function start() { const pluginFiles = await glob(['./src/plugins/*.ts']); await Promise.all( - files.map((item) => { - const content = fs.readFile(item, 'utf8'); + files.map(async (item) => { + const content = await fs.readFile(item, 'utf8'); return fs.writeFile(item, content.replace(/'xior\/utils'/g, "'./utils'")); }) ); await Promise.all( - pluginFiles.map((item) => { - const content = fs.readFile(item, 'utf8'); + pluginFiles.map(async (item) => { + const content = await fs.readFile(item, 'utf8'); return fs.writeFile(item, content.replace(/'xior\/utils'/g, "'../utils'")); }) );