-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathsao.js
62 lines (61 loc) · 1.46 KB
/
sao.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
const _ = require('lodash');
const pkg = require('./package.json');
module.exports = {
templateOptions: {
context: {
kebabCase: _.kebabCase,
startCase: _.startCase,
camelCase: _.camelCase,
templateVersion: pkg.version,
}
},
prompts: {
name: {
message: 'Name of your plugin?',
default: ':folderName:',
},
description: {
message: 'Provide a short description',
default: 'An awesome Kibana plugin',
},
kbnVersion: {
message: 'What Kibana version are you targeting?',
default: 'master',
},
generateApp: {
type: 'confirm',
message: 'Should an app component be generated?',
default: true,
},
generateTranslations: {
type: 'confirm',
message: 'Should translation files be generated?',
default: true,
},
generateHack: {
type: 'confirm',
message: 'Should an hack component be generated?',
default: true,
},
generateApi: {
type: 'confirm',
message: 'Should a server API be generated?',
default: true,
},
},
filters: {
'public/**/*': 'generateApp',
'translations/**/*': 'generateTranslations',
'public/hack.js': 'generateHack',
'server/**/*': 'generateApi',
},
move: {
'gitignore': '.gitignore',
'eslintrc': '.eslintrc',
},
installDependencies: true,
gitInit: true,
post({ log }) {
log.success('Your plugin has been created, use `npm start` to run it');
},
};