Skip to content

Commit dec3ea3

Browse files
author
Guillaume Chau
committed
refactor: new @vue/cli-utils package
1 parent 7e0c697 commit dec3ea3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1824
-225
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = class PromptModuleAPI {
2+
constructor () {
3+
this.features = []
4+
this.injectedPrompts = []
5+
this.promptCompleteCbs = []
6+
}
7+
8+
injectFeature (feature) {
9+
this.features.push(feature)
10+
}
11+
12+
injectPrompt (prompt) {
13+
this.injectedPrompts.push(prompt)
14+
}
15+
16+
injectOptionForPrompt (name, option) {
17+
this.injectedPrompts.find(f => {
18+
return f.name === name
19+
}).choices.push(option)
20+
}
21+
22+
onPromptComplete (cb) {
23+
this.promptCompleteCbs.push(cb)
24+
}
25+
}

0 commit comments

Comments
Β (0)