Technology Used | Resource URL |
---|---|
JavaScript | https://developer.mozilla.org/en-US/docs/Web/JavaScript |
Node.js | https://developer.mozilla.org/en-US/docs/Glossary/Node.js |
This application will generate a professional README.md file for your project based on your responses to prompts in the terminal. Stop wasting time trying to remember markdown syntax and simply answer the questions presented!
The below function takes an object that contains the user's answers prompts about their project. Using template strings, the entire markdown text is generated to be used for writing to the final .md file.
function generateMarkdown(data) {
return `# ${data.title} ${renderLicenseBadge(data.license)}
## Description
${data.desc}
## Table of Contents
* [Installation](#installation)
* [Usage](#usage)
* [License](#license)
* [Contributing](#contributing)
* [Tests](#tests)
* [Questions](#questions)
## Installation
${data.install}
## Usage
${data.usage}
## License
${data.license}
${renderLicenseSection(data.license)}
For more information, please visit [here](${renderLicenseLink(data.license)}).
## Contributing
${data.contribution}
## Tests
${data.test}
## Questions
For any further questions about the application, please email me at: ${data.email}. Visit my [GitHub Profile](${data.username}) to see my other projects.
`;
}