{"size": 2392, "ext": "js", "max_stars_repo_path": "index.js", "max_stars_repo_name": "StevegSiegel/README.md-Generator", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "index.js", "max_issues_repo_name": "StevegSiegel/README.md-Generator", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "index.js", "max_forks_repo_name": "StevegSiegel/README.md-Generator", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.4468085106, "max_line_length": 130, "alphanum_fraction": 0.525083612}
const inquirer = require('inquirer');
const fs = require('fs');
const generateREADME = (answers) =>
`## ${answers.title}   [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)



## Description
${answers.description}.

## Table of contents
- [Description](#description)
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Contribution](#contributing)
- [Tests](#tests)
- [Questions](#questions)

## Installation
${answers.install}.

## Usage
${answers.usage}.

## License
${answers.license} [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT).

## Contributing
${answers.contributing}.

## Tests
${answers.test}.

## Questions
[A link to my gitHub](https://github.com/${answers.gitHub})  
Email: ${answers.email}`;

inquirer.prompt([{
            type: 'input',
            name: 'title',
            message: 'What is the title of the project?',
        },
        {
            type: 'input',
            name: 'description',
            message: 'Description of the project.',
        },
        {
            type: 'input',
            name: 'install',
            message: 'What are the installation instructions?',
        },
        {
            type: 'input',
            name: 'usage',
            message: 'What are the usage instructions?',
        },
        {
            type: 'checkbox',
            name: 'license',
            message: 'what license would you like?',
            choices: ['MIT', 'Apache', 'GNU'],
        },
        {
            type: 'input',
            name: 'contributing',
            message: 'What are the instructions for contributing?',
        },
        {
            type: 'input',
            name: 'test',
            message: 'Do you have any tests to add?'
        },
        {
            type: 'input',
            name: 'gitHub',
            message: 'What is your github username'
        },
        {
            type: 'input',
            name: 'email',
            message: 'What is an email people can send questions to?'
        }
        
        
    ])
    .then((answers) => {
        const READMEcontent = generateREADME(answers);
        fs.writeFile('README.md', READMEcontent, (err) =>
            err ? console.log(err) : console.log('Successfully created README.md')
        );
    });
