-
Notifications
You must be signed in to change notification settings - Fork 0
/
meta.js
66 lines (66 loc) · 1.5 KB
/
meta.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
module.exports = {
prompts: {
name: {
type: 'string',
required: true,
message: 'Project name'
},
author: {
type: 'string',
message: 'Author'
},
type: {
type: 'list',
message: 'Do you want to use router?',
choices:[{
name: 'With React-Router',
value: 'multi',
short: 'Multi(With-Router)'
},{
name: 'No React-Router',
value: 'single',
short: 'Single(No-Router)'
}]
},
stateContainer:{
when: function(answers){
return answers.type === 'single'
},
type: 'confirm',
message: 'Do you want to use redux?',
default: false
},
eslint: {
type: 'confirm',
require: true,
message: 'lint JS with ESLint?',
default: true
},
eslintConfig: {
when: 'eslint',
type: 'list',
message: 'Which eslint config would you like to use?',
choices: [{
name: 'Standard (https://github.com/feross/standard)',
value: 'standard',
short: 'Standard'
}, {
name: 'none (configure it yourself)',
value: 'none',
short: 'None'
}]
},
unit: {
type: 'confirm',
require: true,
message: 'Setup unit tests with Karma + Mocha?',
default: true
}
},
filters: {
'.eslintignore': 'eslint',
'.eslintrc.js': 'eslint',
'test/**/*': 'unit'
},
completeMessage: 'To get started:\n\n cd {{destDirName}}\n npm install\n npm run dev'
}