wip: template

Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
This commit is contained in:
2025-10-22 05:26:09 +02:00
parent c5ce1bfbcd
commit 5e570201bd
7 changed files with 155 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
import type { PlopTypes } from "@turbo/gen";
export default function generator(plop: PlopTypes.NodePlopAPI): void {
// create a generator
plop.setGenerator("package", {
description: "Generator description",
// gather information from the user
prompts: [
{
type: "input",
name: "name",
message: "Package name",
},
{
type: "input",
name: "description",
message: "Package description",
},
{
type: "input",
name: "author.name",
message: "Author name",
},
{
type: "input",
name: "author.email",
message: "Author email",
},
{
type: "input",
name: "author.url",
message: "Author URL",
},
],
// perform actions based on the prompts
actions: [
{
type: "addMany",
destination: "packages/{{name}}",
base: "templates/package",
templateFiles: "templates/package/**/*",
abortOnFail: true,
},
],
});
}