utils/generateMarkdown.js
//function to generate markdown for README
function to generate markdown for README
function to generate markdown for README
function generateMarkdown(data) {
  return `
# ${data.projectTitle}
${data.description ? data.description : ''}
${(tableOfContents(data))}
${(renderLicenseSection(data))}
## ${data.installation ? 'Installation' : ''}
${data.installation ? data.installation : ''}
## ${data.usage ? 'Usage' : ''}
${data.usage ? data.usage : ''}
## ${data.tests ? 'Tests' : ''}
${data.tests ? data.tests : ''}
## ${data.contributing ? 'Contributing' : ''}
${data.contributing ? data.contributing : ''}
## ${data.questions ? 'Questions' : ''}
If you have any further questions you can get in contact with the creator through the following methods:
- https://github.com/${data.githubUser}/
- ${data.email ? data.email : ''}
`;
}
function generateMarkdown ( data ) { return ` ${ data . projectTitle } ${ data . description ? data . description : '' } ${ ( tableOfContents ( data ) ) } ${ ( renderLicenseSection ( data ) ) } ${ data . installation ? 'Installation' : '' } ${ data . installation ? data . installation : '' } ${ data . usage ? 'Usage' : '' } ${ data . usage ? data . usage : '' } ${ data . tests ? 'Tests' : '' } ${ data . tests ? data . tests : '' } ${ data . contributing ? 'Contributing' : '' } ${ data . contributing ? data . contributing : '' } ${ data . questions ? 'Questions' : '' } ${ data . githubUser } ${ data . email ? data . email : '' } ` ; }
function to generate markdown for README
function to generate markdown for README