diff options
author | 2024-08-28 22:52:49 +0800 | |
---|---|---|
committer | 2024-08-28 22:52:49 +0800 | |
commit | 440a4be0a6ca135e47b0d37124c1be03735ba7ff (patch) | |
tree | 0dc30d5fb2fc00cc71ec49b3aa967233789a9471 /benchmark/bench/render.js | |
parent | 6272e6cec07778e81f853754bffaac40e658c700 (diff) | |
download | astro-440a4be0a6ca135e47b0d37124c1be03735ba7ff.tar.gz astro-440a4be0a6ca135e47b0d37124c1be03735ba7ff.tar.zst astro-440a4be0a6ca135e47b0d37124c1be03735ba7ff.zip |
Use tinyexec (#11845)
Diffstat (limited to 'benchmark/bench/render.js')
-rw-r--r-- | benchmark/bench/render.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/benchmark/bench/render.js b/benchmark/bench/render.js index 20c9abb0f..aee04f2b5 100644 --- a/benchmark/bench/render.js +++ b/benchmark/bench/render.js @@ -1,4 +1,4 @@ -import { execaCommand } from 'execa'; +import { exec } from 'tinyexec'; import { markdownTable } from 'markdown-table'; import fs from 'node:fs/promises'; import http from 'node:http'; @@ -20,15 +20,19 @@ export async function run(projectDir, outputFile) { const root = fileURLToPath(projectDir); console.log('Building...'); - await execaCommand(`${astroBin} build`, { - cwd: root, - stdio: 'inherit', + await exec(astroBin, ['build'], { + nodeOptions: { + cwd: root, + stdio: 'inherit', + }, }); console.log('Previewing...'); - const previewProcess = execaCommand(`${astroBin} preview --port ${port}`, { - cwd: root, - stdio: 'inherit', + const previewProcess = exec(astroBin, ['preview', '--port', port], { + nodeOptions: { + cwd: root, + stdio: 'inherit', + }, }); console.log('Waiting for server ready...'); |