This repository has been archived by the owner on Mar 13, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
meta.js
176 lines (160 loc) · 4.39 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
const { helpers, complete } = require('./utils')
module.exports = {
prompts: {
name: {
type: 'string',
message: 'Project name (npm name, kebab-case, without "quasar-ui" prefix)',
validate: val => val && val.length > 0
},
author: {
type: 'string',
message: 'Author',
validate: val => val && val.length > 0
},
license: {
type: 'string',
message: 'License type',
default: 'MIT'
},
features: {
type: 'checkbox',
message: 'Pick what you want to build:',
choices: [
{
name: 'Vue component',
value: 'component',
short: 'Component',
checked: true
},
{
name: 'Vue directive',
value: 'directive',
short: 'Directive'
},
{
name: 'Quasar App Extension',
value: 'ae',
short: 'AE',
checked: true
}
]
},
packageDescription: {
type: 'string',
message: 'Package description',
default: 'My awesome component',
},
umdExportName: {
type: 'string',
message: 'UMD export name (global variable, camelCased)',
validate: val => val && val.length > 0
},
componentName: {
type: 'string',
when: 'features.component',
message: 'Component name (PascalCase)',
default: 'MyComponent',
validate: val => val && val.length > 0
},
componentCss: {
type: 'confirm',
when: 'features.component',
message: 'Do you need a stylesheet for your component?',
default: true
},
directiveName: {
type: 'string',
when: 'features.directive',
message: 'Directive name (kebab-case, without "v-" prefix)',
default: 'my-directive',
validate: val => val && val.length > 0
},
directiveCss: {
type: 'confirm',
when: 'features.directive',
message: 'Does your directive require a stylesheet?',
default: false
},
aeDescription: {
type: 'string',
when: 'features.ae',
required: true,
message: 'App Extension description',
default: 'A Quasar App Extension',
validate: val => val && val.length > 0
},
preset: {
type: 'checkbox',
when: 'features.ae',
message: 'Pick the needed App Extension scripts:',
choices: [
{
name: 'Prompts script',
value: 'prompts'
},
{
name: 'Install script',
value: 'install'
},
{
name: 'Uninstall script',
value: 'uninstall'
}
]
},
repositoryType: {
type: 'string',
message: 'Repository type',
default: 'git'
},
repositoryURL: {
type: 'string',
message: 'Repository URL (eg: https://github.com/quasarframework/quasar)'
},
homepage: {
type: 'string',
message: 'Homepage URL'
},
bugs: {
type: 'string',
message: 'Issue reporting URL (eg: https://github.com/quasarframework/quasar/issues)'
},
autoInstall: {
type: 'list',
message:
'Continue to install project dependencies after the project has been created? (recommended)',
choices: [
{
name: 'Yes, use Yarn (recommended)',
value: 'yarn',
short: 'yarn',
},
{
name: 'Yes, use NPM',
value: 'npm',
short: 'NPM',
},
{
name: 'No, I will handle that myself',
value: false,
short: 'no',
}
]
}
},
filters: {
'app-extension/src/install.js': 'features.ae && preset.install',
'app-extension/src/prompts.js': 'features.ae && preset.prompts',
'app-extension/src/uninstall.js': 'features.ae && preset.uninstall',
'app-extension/**/*': 'features.ae',
'ui/src/components/**/*': 'features.component',
'ui/src/directives/**/*': 'features.directive',
'ui/src/components/Component.sass': 'features.component && componentCss',
'ui/src/directives/Directive.sass': 'features.directive && directiveCss',
'ui/src/**/*.sass': '(features.component && componentCss) || (features.directive && directiveCss)',
'ui/build/script.css.js': '(features.component && componentCss) || (features.directive && directiveCss)',
'ui/build/script.app-ext.js': 'features.ae && (features.component || features.directive)'
},
helpers,
complete
}