-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathplopfile.mjs
37 lines (36 loc) · 898 Bytes
/
plopfile.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { exec } from 'child_process'
export default function (plop) {
// create your generators here
plop.setGenerator('package-lib', {
description: 'create a package lib',
prompts: [
{
type: 'input',
name: 'name',
message: 'package name please',
},
],
actions: [
{
type: 'add',
path: './packages/{{kebabCase name}}/package.json',
templateFile: './plop-templates/package-lib/package.hbs',
},
{
type: 'add',
path: './packages/{{kebabCase name}}/tsup.config.ts',
templateFile: './plop-templates/package-lib/tsup.config.hbs',
},
{
type: 'add',
path: './packages/{{kebabCase name}}/tsconfig.json',
templateFile: './plop-templates/package-lib/tsconfig.hbs',
},
{
type: 'add',
path: './packages/{{kebabCase name}}/src/index.ts',
templateFile: './plop-templates/package-lib/src/index.hbs',
},
],
})
}