I was tasked by the client to create a README generator to save time when doing project work. This will enable me to speedily develop a README and put more time into the development lifecycle.
AS A developer
I WANT a README generator
SO THAT I can quickly create a professional README for a new project
The README generator taking in user input from an NPM called Inquirier. It will ask the user for the following:
- The Project Name
- The Project Description
- Installation
- Usage
- Contributions
- Tests Run
- Questions
- License Details
After the information has been collected, it is parsed into a data object which is then used to populate the values within the markdown text.
At first I found it quite confusing working with Markdown syntax, rather than HTML. Although Markdown seems easier, it was strange using backticks with Markdown rather than HTML.
I had trouble thinking of how to pull down the badge license info. Do I populate an array and add some logic to determine whichever is picked, display the correct badge? I eventually found a website called [ShieldsIO] (https://shields.io/category/license) which helped.
The application can be run by invoking the following command on the index.js file:
node index.js
The README generated by the script is called "SampleREADME.md".
ReadMe-Generator-Demo.mp4
https://developer.mozilla.org/en-US/
https://shields.io/category/license
Copyright (c) [2023] [Joseph Namihas]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.