This command-line application prompts the user for input to generate an SVG file named logo.svg
based on the following criteria:
- Prompt for text input (up to 3 characters)
- Prompt for text color (keyword or hexadecimal number)
- Present a list of shapes to choose from (circle, triangle, square)
- Prompt for shape color (keyword or hexadecimal number)
- Generate
logo.svg
file - Print "Generated logo.svg" in the command line
- When
logo.svg
file is opened in a browser, it should display a 300x200 pixel image matching the user's criteria.
To use this command-line application, follow these steps:
- Open a command-line interface.
- Navigate to the directory where the application is located.
- Run the application by entering the command
node index.js
. - Enter text input when prompted (up to 3 characters).
- Enter text color when prompted (either a keyword such as "red" or a hexadecimal number such as "#FF0000").
- Using the up and down keys to navigate, choose a shape option then press enter to select the shape.
- Enter the shape color when prompted (either a keyword or a hexadecimal number).
- Once all prompts have been answered, the
logo.svg
file will be generated in the same directory as the application file and "Generated logo.svg" will be printed in the command line. - Open the
logo.svg
file in a web browser to view the generated image.
- JavaScript
- Node.js
- Inquirer
- Jest