summaryrefslogtreecommitdiff
path: root/benchmark/bench/render.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/bench/render.js')
-rw-r--r--benchmark/bench/render.js18
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...');