-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
55 lines (38 loc) · 1.31 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
// const inquirer = require("inquirer");
const boxen = require('boxen');
const util = require("util");
// const axios = require("axios");
const ora = require('ora');
const chalk = require('chalk');
const { exitCode } = require("process");
const api = require("./utils/api");
process.on('exit', function(code) {
if(code === 0){
return;
}
const message= `${chalk.yellow('You cancelled the readme generation process.')} ${chalk.blueBright('Thanks for trying ReadMeBuilder. See you again!')}`;
return console.log(message);
});
//Welcome Screen
console.log(
boxen(`
${chalk.blue(chalk.bold(`Welcome to ${chalk.underline('ReadMeBuilder')}`))}
Readme Builder is a general purpose read me generator which builds readme based on your inputs.
You would now be asked a series of questions.Ready?
`,
{
padding: 2 ,
borderColor:'magentaBright',
borderStyle:'round',
float:'center',
}));
//Developer and Github box
console.log(boxen(
chalk.cyanBright('Developer: Abhijeet Bhagat GitHub: https://github.com/bhagatabhijeet/readmebuilder'),{
padding:1,
float:'center',
borderStyle:'round',
borderColor:'blue'
}));
// Call to main function. main does all the action
api.main();