-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (31 loc) · 779 Bytes
/
Copy pathindex.js
File metadata and controls
34 lines (31 loc) · 779 Bytes
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
const Generator = require('yeoman-generator')
module.exports = class extends Generator {
async prompting () {
const answers = await this.prompt([
{
type: 'list',
name: 'ESLint',
message: 'What more would you like to add?',
choices: [
{
name: 'JavaScript Vanilla'
},
{
name: 'JavaScript-Typescript'
}
]
}
])
this.ESLint = answers.ESLint
}
useInfo () {
if (this.ESLint) {
if (this.ESLint === 'JavaScript Vanilla') {
this.composeWith(require.resolve('../ESLint/Vanilla'))
}
if (this.ESLint === 'JavaScript-Typescript') {
this.composeWith(require.resolve('../ESLint/Vanilla-Typescript'))
}
}
}
}