diff --git a/src/templates/README.md.ejs b/src/templates/README.md.ejs index 840a9a9..f43a2b2 100644 --- a/src/templates/README.md.ejs +++ b/src/templates/README.md.ejs @@ -1,3 +1,4 @@ +<% if (props.badges.exists) { %> <% if (props.badges.exists('gitpod')) {%><%= `[![Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#${props.githubRepository.url})`%><% } %> <% if (props.badges.exists('heroku')) {%><%= `[![Heroku](https://img.shields.io/badge/CI-%E2%9C%93-green.svg?logo=heroku&colorA=79589f&logoColor=white&style=flat-square)](${props.herokuUrl})` %><% } %> <% if (props.badges.exists('repl.it')) {%><%= `[![Repl.it](https://repl.it/badge/github/${props.githubRepository.author}/${props.githubRepository.name})](${props.replitUrl})` %><% } %> @@ -9,7 +10,7 @@ <% if (props.badges.exists('repositorysocialstatus')) {%><%= `[![Forks](https://img.shields.io/github/forks/${props.githubRepository.author}/${props.githubRepository.name}?style=social)](${props.githubRepository.url}/network/members) [![Stars](https://img.shields.io/github/stars/${props.githubRepository.author}/${props.githubRepository.name}?style=social)](${props.githubRepository.url}/stargazers) [![Watches](https://img.shields.io/github/watchers/${props.githubRepository.author}/${props.githubRepository.name}?style=social)](${props.githubRepository.url}/watchers)` %><% } %> <% if (props.badges.exists('authortwitter')) {%><%= `[![Author Twitter](https://img.shields.io/twitter/follow/${props.author.twitter}.svg?style=social)](https://twitter.com/${props.author.twitter})`%><% } %> - +<% } %>

Welcome to <%= props.projectName %> ๐Ÿ‘‹

<%- props.status ? `

๐Ÿšง ${props.projectName} in ${props.status}... ๐Ÿšง

` : '' %> @@ -18,14 +19,18 @@ <%- `> ${props.description}`%> -<%= props.githubRepository.api.index.homepage ? `๐Ÿก Home: ${props.githubRepository.api.index.homepage}` : '' %> +<% if (props.githubRepository.api?.index?.homepage) { %> + ๐Ÿก Home: <%= props.githubRepository.api.index.homepage %> +<% } %> -<% if (props.images.screenshots.length) {%><%- '
\nScreenshots\n\n'%><% } %> +<% if (props.images.screenshots?.length) { %> +
Screenshots <% for (index in props.images.screenshots) {%><%- `screenshot${index}\n`%><% } %> -<% if (props.images.screenshots.length) {%><%- '
'%><% } %> +
+<% } %> ### ๐Ÿ”– Table Of Contents -<%= props.about ? '\n- ๐Ÿ“ƒ [About](#about)' : '' %><%= '\n- ๐Ÿค” [How To Use](#how-to-use)' %><%= props.technologies.length ? '\n- ๐Ÿš€ [Technologies](#technologies)' : '' %><%= props.requirements.length ? '\n- ๐ŸŒฑ [Minimal Requirements](#minimal-requirements)' : '' %><%= props.features.exists ? '\n- ๐ŸŽŠ [Features](#features)' : ''%><%= props.features.finished.length ? '\nยจยจ- ๐ŸŽ‡ [Finished](#features-finished)' : '' %><%= props.features.pendent.length ? '\nยจยจ- ๐ŸŽ† [Pendent](#features-pendent)' : '' %><%= props.contribute.tutor.show ? '\n- ๐Ÿ’ก [How To Contribute](#how-to-contribute)' : '' %><%= props.contribute.contributors.show ? '\n - ๐Ÿค— [Contributors](#contributors)' : '' %><%= props.author.exists ? '\n- ๐Ÿ‘ค [Author](#author)' : '' %><%= props.license.name ? '\n- ๐Ÿ” [License](#license)' : '' %> +<%= props.about ? '\n- ๐Ÿ“ƒ [About](#about)' : '' %><%= '\n- ๐Ÿค” [How To Use](#how-to-use)' %><%= props.technologies?.length ? '\n- ๐Ÿš€ [Technologies](#technologies)' : '' %><%= props.requirements?.length ? '\n- ๐ŸŒฑ [Minimal Requirements](#minimal-requirements)' : '' %><%= props.features.exists ? '\n- ๐ŸŽŠ [Features](#features)' : ''%><%= props.features.finished?.length ? '\nยจยจ- ๐ŸŽ‡ [Finished](#features-finished)' : '' %><%= props.features.pendent?.length ? '\nยจยจ- ๐ŸŽ† [Pendent](#features-pendent)' : '' %><%= props.contribute.tutor?.show ? '\n- ๐Ÿ’ก [How To Contribute](#how-to-contribute)' : '' %><%= props.contribute.contributors?.show ? '\n - ๐Ÿค— [Contributors](#contributors)' : '' %><%= props.author.exists ? '\n- ๐Ÿ‘ค [Author](#author)' : '' %><%= props.license.name ? '\n- ๐Ÿ” [License](#license)' : '' %> --- @@ -33,22 +38,22 @@ <%- `

๐Ÿค” How To Use

\n\n${props.howToUse}\n\n[Back To The Top](#title)\n\n---\n`%> -<% if (props.technologies.length) {%><%- '

๐Ÿš€ Technologies

\n\n'%><% } %> +<% if (props.technologies?.length) {%><%- '

๐Ÿš€ Technologies

\n\n'%><% } %> <% for (tech of props.technologies) {%><%= `- ${tech}\n`%><% } %> -<% if (props.technologies.length) {%><%= '\n\n[Back To The Top](#title)\n\n---\n'%><% } %> +<% if (props.technologies?.length) {%><%= '\n\n[Back To The Top](#title)\n\n---\n'%><% } %> -<% if (props.requirements.length) {%><%- '

๐ŸŒฑ Minimal Requirements

\n\n'%><% } %> +<% if (props.requirements?.length) {%><%- '

๐ŸŒฑ Minimal Requirements

\n\n'%><% } %> <% for (requirement of props.requirements) {%><%= `- ${requirement}\n`%><% } %> -<% if (props.requirements.length) {%><%= '\n\n[Back To The Top](#title)\n\n---\n'%><% } %> +<% if (props.requirements?.length) {%><%= '\n\n[Back To The Top](#title)\n\n---\n'%><% } %> -<% if (props.features.finished.length || props.features.pendent.length) {%><%- '

๐ŸŽŠ Features

\n\n'%><% } %> -<% if (props.features.finished.length) {%><%- '\n

๐ŸŽ‡ Finished

\n'%><% } %> -<% for (featureFinished of props.features.finished) {%><%= `\n- [x] ${featureFinished}`%><% } %> -<% if (props.features.pendent.length) {%><%- '\n

๐ŸŽ† Pendent

\n'%><% } %> -<% for (featurePendent of props.features.pendent) {%><%= `\n- [ ] ${featurePendent}`%><% } %> -<% if (props.features.finished.length || props.features.pendent.length) {%><%- '\n\n[Back To The Top](#title)\n\n---\n'%><% } %> +<% if (props.features.finished?.length || props.features.pendent?.length) {%><%- '

๐ŸŽŠ Features

\n\n'%><% } %> +<% if (props.features.finished?.length) {%><%- '\n

๐ŸŽ‡ Finished

\n'%><% } %> +<% for (featureFinished of props.features.finished || []) {%><%= `\n- [x] ${featureFinished}`%><% } %> +<% if (props.features.pendent?.length) {%><%- '\n

๐ŸŽ† Pendent

\n'%><% } %> +<% for (featurePendent of props.features.pendent || []) {%><%= `\n- [ ] ${featurePendent}`%><% } %> +<% if (props.features.finished?.length || props.features.pendent?.length) {%><%- '\n\n[Back To The Top](#title)\n\n---\n'%><% } %> -<% if (props.contribute.tutor.show) {%><%- `

๐Ÿ’ก How To Contribute

\n\n +<% if (props.contribute.tutor?.show) {%><%- `

๐Ÿ’ก How To Contribute

\n\n - Make a fork of this repository - Clone to you machine and entry on respective paste - Create a branch with your resource: \`git checkout -b my-feature\` @@ -64,10 +69,15 @@

\n\n[Back To The Top](#title)\n\n---`%><% } %> -<% if (props.contribute.contributors.show) {%><%- `

๐Ÿค— Contributors

\n\n\n

`%><% } %> +<% if (props.contribute.contributors?.show) { %> +

๐Ÿค— Contributors

+

<% for (contributor of props.contribute.contributors.users) {%> <%- `${contributor.login}`%><% } %> -<% if (props.contribute.contributors.show) {%><%- `\n\n

\n\n\n[Back To The Top](#title)\n\n---`%><% } %> +

+ +[Back To The Top](#title) +<% } %> <% if (props.author.exists) {%><%- '

๐Ÿ‘ค Author

\n\n'%><% } %> <% if (props.author.name) {%><%- `๐Ÿค“ **${props.author.name}**\n`%><% } %>