-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCLIquery.js
44 lines (44 loc) · 1.08 KB
/
CLIquery.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
const inquirer = require("inquirer");
exports.ask = () => {
const questions = [
{
name: "projName",
message: "choose a project Name ",
default: "server",
},
{
name: "projAuthor",
message: "specify the Author ",
default: "",
},
{
name: "projVersion",
message: "choose a project version ",
default: "1.0.0",
},
{
name: "git",
type: "list",
choices: ["Yes", "No"],
filter: (val) => val === "Yes" ,
message: "Would you like to initialize an empty git repository ?",
},
{
name: "mainName",
message: "What should the main file be called ?",
default: "server.js",
},
{
name: "routerMount",
message: "where would you like your endpoints to be mounted? (follow this format : /api/v1)",
default: "/",
},
{
type: "checkbox",
name: "DEPS",
message: "What should your project contain ?",
choices: ["helmet", "mongoose", "passport-jwt", "morgan", "cors", "nodemon"],
},
];
return inquirer.prompt(questions);
};