-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
58 lines (47 loc) · 1.06 KB
/
index.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
const inquirer = require('inquirer');
const generateNormRule = require('./utils/generateNormRule.js')
const questions = [
{
type: 'input',
message: 'What is the LCSH heading?',
name: "lcshHeading",
},
{
type: 'input',
message: 'What is the LCSH tag?',
name: "lcshTag",
},
{
type: 'input',
message: 'What is the new local heading?',
name: "localHeading",
},
{
type: 'input',
message: 'What is the new local tag?',
name: "localTag",
},
{
type: 'checkbox',
message: 'Which subfield is the lcsh heading?',
name: "subfield",
choices: ['a', 'x']
},
{
type: 'input',
message: 'What is the vocabulary code?',
name: "vocabCode",
},
]
function writeToFile(fileName, data) {
inquirer
.prompt(questions)
.then((data) => {
// writeToFile()
console.log(generateNormRule(data))
})
}
function init() {
writeToFile()
}
init();