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'")); }) );