@turbo/gen
使用此包在你的 Turborepo 代码生成器 中进行类型定义。
¥Use this package for type definitions in your Turborepo code generators.
更多信息,请使用 访问代码生成指南。
¥For more information, visit the Generating code guide.
使用此包在你的 Turborepo 代码生成器 中进行类型定义。
¥Use this package for type definitions in your Turborepo code generators.
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.