DEV Community

Cover image for Automating React Component Generation with a Shell Script

Automating React Component Generation with a Shell Script

Sara on February 29, 2024

React components are the building blocks of a React application. Creating them manually can be time-consuming, especially when they follow a simila...
Collapse
 
adrianolupossa profile image
Adriano Lupossa

There's some errors on the script that prevent to run

Collapse
 
mitevskasar profile image
Sara

Would you mind sharing the errors? So that I can help and update the script

Collapse
 
adrianolupossa profile image
Adriano Lupossa

It has some minor issues, but the idea is good. Some of them are:

  1. The "read" command shouldn't have a space between the "-" and the "p"

  2. In the if statements it should have space around its operators "[ ! -d "$template" ]"