Turborepo

@turbo/gen

Use this package for type definitions in your Turborepo code generators.

./turbo/generators/my-generator.ts
import type { PlopTypes } from "@turbo/gen"; 
 
export default function generator(plop: PlopTypes.NodePlopAPI): void {
  // Create a generator
  plop.setGenerator("Generator name", {
    description: "Generator description",
    // Gather information from the user
    prompts: [
      ...
    ],
    // Perform actions based on the prompts
    actions: [
      ...
    ],
  });
}

For more information, visit the Generating code guide.

hours

Total Compute Saved
Get started with
Remote Caching →

On this page

No Headings