diff --git a/package.json b/package.json index 7c686f5..097da67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "readme-template-generator", - "version": "0.7.4", + "version": "0.7.5", "description": "CLI to help create readme file to document your project", "private": false, "repository": { diff --git a/src/commands/readme-template-generator.ts b/src/commands/readme-template-generator.ts index 6569595..d0244f4 100644 --- a/src/commands/readme-template-generator.ts +++ b/src/commands/readme-template-generator.ts @@ -176,6 +176,18 @@ const command: GluegunCommand = { technologies.push(tech) } + const requirements: string[] = [] + + while (true) { + const requirement: string = await question({ + message: '🌱 List a minimal requirements to run project (use empty value to skip):' + }) + + if (!requirement) break + + requirements.push(requirement) + } + const features: Types.Features = { finished: [], pendent: [] @@ -310,6 +322,7 @@ const command: GluegunCommand = { about, howToUse, technologies, + requirements, features, contribute, author, diff --git a/src/templates/README.md.ejs b/src/templates/README.md.ejs index 5d948e3..5800db5 100644 --- a/src/templates/README.md.ejs +++ b/src/templates/README.md.ejs @@ -28,7 +28,7 @@ <% if (props.images.screenshots.length) {%><%- ''%><% } %> ### 🔖 Table Of Contents -<% if (props.about) {%><%= '\n- 📃 [About](#about)'%><% } %><% if (props.technologies.length) {%><%= '\n- 🤔 [How To Use](#how-to-use)'%><%= '\n- 🚀 [Technologies](#technologies)'%><% } %><% if (props.contribute.tutor.show) {%><% if (props.features.finished.length || props.features.pendent.length) {%><%= '\n- 🎇 [Features](#features)'%><% } %><%= '\n- 💡 [How To Contribute](#how-to-contribute)'%><% } %><% if (props.contribute.contributors.show) {%><%= '\n - 🤗 [Contributors](#contributors)'%><% } %><% if (props.author.exists) {%><%= '\n- 👤 [Author](#author)'%><% } %><% if (props.license.name) {%><%= '\n- 🔏 [License](#license)'%><% } %> +<% if (props.about) {%><%= '\n- 📃 [About](#about)'%><% } %><%= '\n- 🤔 [How To Use](#how-to-use)'%><% if (props.technologies.length) {%><%= '\n- 🚀 [Technologies](#technologies)'%><% } %><% if (props.requirements.length) {%><%= '\n- 🌱 [Minimal Requirements](#minimal-requirements)'%><% } %><% if (props.contribute.tutor.show) {%><% if (props.features.finished.length || props.features.pendent.length) {%><%= '\n- 🎇 [Features](#features)'%><% } %><%= '\n- 💡 [How To Contribute](#how-to-contribute)'%><% } %><% if (props.contribute.contributors.show) {%><%= '\n - 🤗 [Contributors](#contributors)'%><% } %><% if (props.author.exists) {%><%= '\n- 👤 [Author](#author)'%><% } %><% if (props.license.name) {%><%= '\n- 🔏 [License](#license)'%><% } %> --- @@ -40,6 +40,10 @@ <% for (tech of props.technologies) {%><%= `- ${tech}\n`%><% } %> <% if (props.technologies.length) {%><%= '\n\n[Back To The Top](#title)\n\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.features.finished.length || props.features.pendent.length) {%><%- '

🎇 Features

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