Skip to content

task is to build a Node.js command-line application that takes in user input to generate a logo and save it as an SVG file.

Notifications You must be signed in to change notification settings

anryl050/MakeMeALogo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAKE-ME-A-LOGO

Badge

Table of Content

Project Description

The scope of project is to buikd a Node.js command command-line application that takes in user input to generate a logo and save it as an SVG file. he application prompts the user to select a color and shape, provide text for the logo, and save the generated SVG to a .svg file.

User Story

AS a freelance web developer I WANT to generate a simple logo for my projects SO THAT I don't have to pay a graphic designer

Acceptance Criteria

GIVEN a command-line application that accepts user input

  • WHEN I am prompted for text, THEN I can enter up to three characters.

  • WHEN I am prompted for the text color, THEN I can enter a color keyword (OR a hexadecimal number).

  • WHEN I am prompted for a shape, THEN I am presented with a list of shapes to choose from: circle, triangle, and square.

  • WHEN I am prompted for the shape's color, THEN I can enter a color keyword (OR a hexadecimal number).

  • WHEN I have entered input for all the prompts, THEN an SVG file is created named logo.svg AND the output text "Generated logo.svg" is printed in the command line.

  • WHEN I open the logo.svg file in a browser, THEN I am shown a 300x200 pixel image that matches the criteria I entered.

Additional Requirements

The application must use Jest for running the unit tests.

Video Exaplanation

Demo Video

Installation

  • User needs to install node.js (version 18.15.0 LTS).
  • To use the application user has to list inquirer (version 8.2.4) and jest (version 29.4.3) as dependencies in the package.json file.
  • To install inquirer and jest, the user needs to open the intergrated terminal and type npm install or npm i. This will isntall the inquirer and jest based on the specified version in the package.json file.
  • Once inquirer and jest are installed, the user can run the application.

Usage

  • To run the application, type "npm start" in the VS terminal.
  • Follow the prompts to input the information.
  • Once the script is done running, a new logo.svg file with all user inputs is populated. To view the newly generated logo, the user must open it with a live server.

Example SVG files

image image image

Tests

  • Unit Testing must be comepleted to validated the code. Three test were created to verify that the SVG logo can be correctly rendered based for each shape 9Circle, triangle and Square) based on the inputs for logo's color, text and text's color.
  • To run the test, user must open intergrated terminal and type npm test.

Contribution

ASK BCS (for assisting with troubleshooting)

License

Licensed under the MIT license.

About

task is to build a Node.js command-line application that takes in user input to generate a logo and save it as an SVG file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published