Skip to main content

$()

execa를 사용하여 주어진 명령어를 실행합니다.

Signature

declare function $(cmd: string, args: string[], options?: SpawnSyncOptionsWithBufferEncoding): ChildProcess;

Parameters

Parameter

Type

Description

cmd

string

실행할 명령어입니다.

args

string[]

명령어에 전달할 인수들입니다.

options

SpawnSyncOptionsWithBufferEncoding

(Optional) execa 옵션입니다.

Returns

ChildProcess

execaChildProcess 객체를 반환합니다.

Example

// execa를 사용하여 명령어를 실행하는 예시
const result = $(cmd, args, options);