diff options
author | 2024-08-28 17:25:13 +0200 | |
---|---|---|
committer | 2024-08-28 17:25:13 +0200 | |
commit | 68601a954907ef77470e7a5cf9d4c8ff89fe2c99 (patch) | |
tree | 38c4cf4836b9876cb2b093efb5a1a3c193719179 /benchmark/bench/render.js | |
parent | 93932432e7239a1d31c68ea916945302286268e9 (diff) | |
parent | 26893f9a356e49c5c49052bd36f8b2e7e04edf4d (diff) | |
download | astro-68601a954907ef77470e7a5cf9d4c8ff89fe2c99.tar.gz astro-68601a954907ef77470e7a5cf9d4c8ff89fe2c99.tar.zst astro-68601a954907ef77470e7a5cf9d4c8ff89fe2c99.zip |
Merge branch 'main' into next
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...'); |