contribution_content = """
Thank you for considering contributing to the React-CopyText project! 🎉 This document outlines the guidelines and processes for contributing to ensure a smooth and efficient workflow.
- Prerequisites
- Project Structure
- Setting Up the Development Environment
- Making Commits with Commitizen
- Running the Release Script
- Best Practices
- Submitting Changes
- Contact
Before contributing, ensure you have the following installed on your system:
- Node.js (v16 or higher)
- NPM (v7 or higher)
- Git
- Familiarity with React and TypeScript.
The project follows this structure:
├── src/ # Source code for the library
│ ├── Test.tsx # Example component
│ └── index.ts # Exports for the library
├── example/ # Example app for development and testing
├── dist/ # Compiled files (not included in Git)
├── .husky/ # Git hooks for commit linting
├── package.json # Project configuration
├── CHANGELOG.md # Automatically generated changelog
└── CONTRIBUTION.md # Contribution guidelines
-
Clone the repository:
git clone https://github.com/<your-username>/react-copytext.git cd react-copytext
-
Install dependencies:
npm install
-
Start the example app for local testing:
npm run start:example
We use Commitizen to ensure commit messages follow the Conventional Commits format.
- Make changes to the project.
- Stage your changes:
git add <file>
- Use Commitizen to make a commit:
npx cz
- Follow the prompts to write a descriptive, properly formatted commit message.
Releases are automated using standard-version
and a custom release.sh
script.
- Ensure all tests pass and the code is stable.
- Run the release script:
./release.sh
- The script will:
- Update the version in
package.json
. - Generate and append changes to
CHANGELOG.md
. - Create a commit and tag for the release.
- Publish the package to NPM.
- Push the changes and tags to the repository.
- Update the version in
- Write clean, maintainable code using TypeScript.
- Follow the existing project structure and naming conventions.
- Use CSS modules for styling (
*.module.css
).
- Always use Commitizen for commits (
git commit
will usenpx cz
). - Write meaningful commit messages (e.g.,
feat: add CopyText component
).
- Test your changes locally using the example app.
- If relevant, add or update tests in the
tests/
directory.
- Ensure compatibility with
react
(>=16.8.0 <20.0.0) andreact-dom
(>=16.8.0 <20.0.0).
- Fork the repository and create a new branch:
git checkout -b feature/my-feature
- Make your changes and commit them using Commitizen.
- Push your branch to your fork:
git push origin feature/my-feature
- Open a pull request against the
main
branch.
If you have any questions or need further assistance, feel free to open an issue or reach out to the project maintainers.
"""