mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
12 lines
293 B
JavaScript
12 lines
293 B
JavaScript
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;
|
|
}
|