-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gogenrc.js
47 lines (47 loc) · 917 Bytes
/
.gogenrc.js
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
38
39
40
41
42
43
44
45
46
47
/**
* @type {import('gogen').Generator}
*/
module.exports = async ({
src,
dest,
pipeline,
packages,
install,
gitInit,
prompts,
}) => {
const {description, devDeps} = await prompts(
[
{
type: 'text',
name: 'description',
message: 'Description',
},
{
type: 'multiselect',
name: 'devDeps',
message: 'Choose dev dependencies',
choices: [
{title: 'ESLint', value: 'eslint'},
{title: 'Jest', value: 'jest'},
{title: 'Prettier', value: 'prettier', selected: true},
],
},
],
{onCancel: process.exit}
)
await pipeline(
src('template/**'),
packages({
description,
...(devDeps.includes('jest') && {
jest: {
coverageReporters: ['html'],
},
}),
}),
dest()
)
await install(devDeps, {dev: true})
await gitInit()
}