-
Notifications
You must be signed in to change notification settings - Fork 1
/
prompts.js
111 lines (110 loc) · 2.66 KB
/
prompts.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/**
* Checks if an answer is custom
*
* @param {object} answers Object of all answers
* @return {boolean} true = custom, false = default
*/
function isCustom (answers) {
return answers.preset === 'configure';
}
module.exports = [
{
name: 'preset',
message: 'Choose a preset:',
type: 'list',
choices: [
{ name: 'Use defaults (STRONGLY recommended)', value: 'default' },
{ name: 'Manual configuration (advanced)', value: 'configure' }
],
default: 'default'
},
{
name: 'verbose',
type: 'confirm',
message: 'Show helpful error messages?',
default: true,
when: isCustom
},
{
name: 'removeDataTest',
type: 'confirm',
message: 'data-test Attributes?',
default: true,
prefix: 'Remove the following from your snapshots:',
when: isCustom
},
{
name: 'removeDataTestid',
type: 'confirm',
message: 'data-testid Attributes?',
default: true,
prefix: 'Remove the following from your snapshots:',
when: isCustom
},
{
name: 'removeDataTestId',
type: 'confirm',
message: 'data-test-id Attributes?',
default: true,
prefix: 'Remove the following from your snapshots:',
when: isCustom
},
{
name: 'removeDataQa',
type: 'confirm',
message: 'data-qa Attributes?',
default: false,
prefix: 'Remove the following from your snapshots:',
when: isCustom
},
{
name: 'removeDataVId',
type: 'confirm',
message: 'data-v-ID\'s from scoped styles?',
default: true,
prefix: 'Remove the following from your snapshots:',
when: isCustom
},
{
name: 'removeServerRendered',
type: 'confirm',
message: 'Server Rendered attributes?',
default: true,
prefix: 'Remove the following from your snapshots:',
when: isCustom
},
{
name: 'removeClassTest',
type: 'confirm',
message: 'Classes that start with test?',
default: false,
prefix: 'Remove the following from your snapshots:',
when: isCustom
},
{
name: 'removeIdTest',
type: 'confirm',
message: 'ID attributes that start with test?',
default: false,
prefix: 'Remove the following from your snapshots:',
when: isCustom
},
{
name: 'removeComments',
type: 'confirm',
message: 'HTML comments?',
default: false,
prefix: 'Remove the following from your snapshots:',
when: isCustom
},
{
name: 'experimentalFeatures',
type: 'checkbox',
message: 'Select experimental snapshot features (not recommended):',
choices: [
{ name: 'Add input values?', value: 'addInputValues' },
{ name: 'Stringify objects?', value: 'stringifyObjects' }
],
when: isCustom
}
];