GithubHelp home page GithubHelp logo

readme_generator_assign9's Introduction

ReadMe_Generator_Assign7

Table of Contents:

  1. Purpose
  2. Process
  3. Issues
  4. What I Learned
  5. Video
  6. Link
  7. Screenshot

Purpose

This project takes node.js, javascript and inquirer npm and makes a ReadMe generator. The user will access it via the command line, fill out the required questions, and then they will be presented with a polished, professional Readme for their desired project. This readme will be listed as Project.md. I built this project to apply my newfound knowledge in node.js, javascript, and in the usage of npms.

Process

  • First I began by installing inquirer onto my application.
  • Then I went to generateMarkdown.js and built the layout of the readMe that would be deployed once the user put in the required info.
  • From there I went into index.js and built an object that would contain the question types and messages that the user would see. In order to make it work I needed to make sure that it was built inside a function that would prompt inquirer npm to run. I required fs and inquirer to run in order for any further work to go forward.
  • After successfully testing to make sure that the questions were being deployed into the command line, I then linked the generateMarkdown.js to the index.js by require so that I could use fs.writeFile to fill in the necesscary spaces of the readMe that the user was attempting to create.
  • To improve upon this application, I went and made a function in index.js that would check if the value of the user's input on a given question was empty. If it was, the program would bring back the question and require that the user fill it out. This way, there would be no sections left unanswered within the readMe, as this would create an unprofessional design. This was inspired by fellow student Yakini Kani, who showed the class during her method during office hours of tuesday july 22nd. The method she was using was also to keep users from not entering values.

Issues I Encountered

  • When to make something asynchronous. When I attempted to make the function that would check to see if the user's input was empty, I thought I needed to make the promptUser function async and have the prompt await the other function. While this did work, it made it so that the user's input couldn't be deployed. In order to fix this I simply needed to return the prompt and get rid of the async function.
  • Another issue I had was troubleshooting problems that would occur on the command line. This is due to a lack of experience working within the command line. In order to improve I will need to get a better understanding of what errors like unhandled promise rejection mean.

What I Learned

  • How to create a package.json via npm init
  • How to install the different packages into the application
  • How to create a secondary javascript file that can be called upon by require in the primary javascript
  • How to use npm's like inquirer
  • How to write and edit files via fs

Video Demo

Video Gif of the Application

  • If you wish to go back and see specific steps of the demo, feel free to click the link below and download the video demo
  • Video Demo

Link

Screenshot

Screenshot of the top half of index.js Screenshot of the bottom half of index.js Screenshot of the javascript that creates the readMe Screenshot of the generated readme

readme_generator_assign9's People

Contributors

corvus-cyber avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.