function init() {
    inquirer
    .prompt([
        {
            type: 'input',
            message: 'Enter the README title',
            name: 'title'
        },
        {
            type: 'input',
            message: questions[0],
            name: 'description'
        },
        {
            type: 'input',
            message: questions[1],
            name: 'installation',
        },
        {
            type: 'input',
            message: questions[2],
            name: 'usage',
        },
        {
            type: 'input',
            message: questions[3],
            name: 'contribution',
        },
        {
            type: 'input',
            message: questions[4],
            name: 'test',
        },
        {
            type: 'list',
            message: "Choose a licensing badge",
            name: 'license',
            choices: ['MIT', 'GNU GPLv3', 'Mozilla Public License 2.0', 'Unlicense', 'Apache License 2.0']
        },
        {
            type: 'input',
            message: 'Please enter your GitHub username',
            name: 'username'
        },
        {
            type: 'input',
            message: 'Please enter your email',
            name: 'email'
        }
    ])
    .then((answers) => {
        // Turnoury for each user input to check if it should be included
        answers.description ? console.log('including description...') : includeDescription = false;
        answers.installation ? console.log('including installation...') : includeInstallation = false;
        answers.usage ? console.log('including usage...') : includeUsage = false;
        answers.contribution ? console.log('including contribution...') : includeContribution = false;
        answers.test ? console.log('including test...') : includeTest = false;
        // Adds opening line to readme based on git user name and email
        writeToFile(`${answers.title}.md`, answers);
    })

}
// TODO: Create a function to initialize app
Create a function to initialize app
Create a function to initialize app
function init() {
    inquirer
    .prompt([
        {
            type: 'input',
            message: 'Enter the README title',
            name: 'title'
        },
        {
            type: 'input',
            message: questions[0],
            name: 'description'
        },
        {
            type: 'input',
            message: questions[1],
            name: 'installation',
        },
        {
            type: 'input',
            message: questions[2],
            name: 'usage',
        },
        {
            type: 'input',
            message: questions[3],
            name: 'contribution',
        },
        {
            type: 'input',
            message: questions[4],
            name: 'test',
        },
        {
            type: 'list',
            message: "Choose a licensing badge",
            name: 'license',
            choices: ['MIT', 'GNU GPLv3', 'Mozilla Public License 2.0', 'Unlicense', 'Apache License 2.0']
        },
        {
            type: 'input',
            message: 'Please enter your GitHub username',
            name: 'username'
        },
        {
            type: 'input',
            message: 'Please enter your email',
            name: 'email'
        }
    ])
    .then((answers) => {
        answers.description ? console.log('including description...') : includeDescription = false;
        answers.installation ? console.log('including installation...') : includeInstallation = false;
        answers.usage ? console.log('including usage...') : includeUsage = false;
        answers.contribution ? console.log('including contribution...') : includeContribution = false;
        answers.test ? console.log('including test...') : includeTest = false;
        writeToFile(`${answers.title}.md`, answers);
    })
}
function init ( ) { inquirer . prompt ( [ { type : 'input' , message : 'Enter the README title' , name : 'title' } , { type : 'input' , message : questions [ 0 ] , name : 'description' } , { type : 'input' , message : questions [ 1 ] , name : 'installation' , } , { type : 'input' , message : questions [ 2 ] , name : 'usage' , } , { type : 'input' , message : questions [ 3 ] , name : 'contribution' , } , { type : 'input' , message : questions [ 4 ] , name : 'test' , } , { type : 'list' , message : "Choose a licensing badge" , name : 'license' , choices : [ 'MIT' , 'GNU GPLv3' , 'Mozilla Public License 2.0' , 'Unlicense' , 'Apache License 2.0' ] } , { type : 'input' , message : 'Please enter your GitHub username' , name : 'username' } , { type : 'input' , message : 'Please enter your email' , name : 'email' } ] ) . then ( ( answers ) => { answers . description ? console . log ( 'including description...' ) : includeDescription = false ; answers . installation ? console . log ( 'including installation...' ) : includeInstallation = false ; answers . usage ? console . log ( 'including usage...' ) : includeUsage = false ; answers . contribution ? console . log ( 'including contribution...' ) : includeContribution = false ; answers . test ? console . log ( 'including test...' ) : includeTest = false ; writeToFile ( ` ${ answers . title } ` , answers ) ; } ) }
TODO: Create a function to initialize app
TODO : Create a function to initialize app
// Turnoury for each user input to check if it should be included // Adds opening line to readme based on git user name and email