blob: 5ec8b49baab260b36cfce7815dd05153eb222cc7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
import { execa } from 'execa';
/** Returns a process running the Astro CLI. */
export function cli(/** @type {string[]} */ ...args) {
const spawned = execa('npx', ['astro', ...args], {
env: { ASTRO_TELEMETRY_DISABLED: true },
});
spawned.stdout.setEncoding('utf8');
return spawned;
}
|