@turbo/gen

Turborepo 코드 생성기의 타입 정의를 위해 이 패키지를 사용합니다.

./turbo/generators/my-generator.ts
import type { PlopTypes } from "@turbo/gen"; 
 
export default function generator(plop: PlopTypes.NodePlopAPI): void {
  // 생성기 생성
  plop.setGenerator("Generator name", {
    description: "Generator description",
    // 사용자로부터 정보 수집
    prompts: [
      ...
    ],
    // 프롬프트를 기반으로 작업 수행
    actions: [
      ...
    ],
  });
}

자세한 정보는 코드 생성 가이드를 참조하세요.