Welcome to the React project repository! This project is set up with a powerful code generation tool called Plop. With Plop, you can easily create new components along with their corresponding test files automatically. This ensures consistency across your codebase and saves you time.
- Automated Component Creation: Quickly scaffold new React components.
- Automatic Test File Generation: Each new component comes with a pre-configured test file.
- Consistency and Efficiency: Standardized component and test structure to maintain code quality and speed up development.
- Follow these instructions to get the project up and running on your local machine.
- Make sure you have Node.js and npm installed. You can download them from nodejs.org.
- Clone the repository:
This project uses Plop to streamline the creation of new components and their corresponding test files.
You will be prompted to enter the name of the new component. Plop will then create the following files in the src/components directory:
ComponentName/ComponentName.js: The new React component. ComponentName/ComponentName.test.js: The Jest test file for the new component. Running Tests:
After generating a new component and its test file, you can run the tests using:
npm test
- Here's an overview of the project structure:
my-app/ ├── plop-templates/ │ ├── Component.js.hbs │ └── Component.test.js.hbs ├── src/ │ ├── components/ │ │ └── ExampleComponent/ │ │ ├── ExampleComponent.js │ │ └── ExampleComponent.test.js ├── plopfile.js ├── package.json └── ...
We welcome contributions! Please fork the repository and submit a pull request for any changes you'd like to make.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or suggestions, feel free to open an issue or contact us at [email protected].