We are excited that you are considering contributing to the ngx-smart-forms project! This document provides guidelines and instructions to help you contribute effectively to the monorepo. Contributions include bug reports, feature requests, documentation improvements, and code changes.
- Code of Conduct
- How to Contribute
- Setting Up Your Development Environment
- Coding Standards
- Pull Request Process
- License
We have adopted a Code of Conduct to maintain a welcoming and inclusive environment. Please review our Code of Conduct before contributing to the project.
If you encounter any bugs, please create an issue in the GitHub repository. Include as much detail as possible to help us reproduce and fix the issue quickly.
When reporting bugs, please include:
- A detailed description of the problem.
- Steps to reproduce the issue.
- Screenshots or error logs, if applicable.
- Information about your environment (e.g., browser, Node.js version, Angular version, etc.).
We are always open to suggestions for new features or improvements! To propose a new feature, please create a feature request in the repository and provide:
- A clear description of the feature.
- Use cases or examples of how the feature will improve the library.
- Any other relevant details or considerations.
If you would like to contribute code to the project, follow these steps:
1; Fork the repository and create a new feature branch. 2; Implement your changes, making sure to follow the coding standards outlined below. 3; Write tests to cover your changes. 4; Submit a pull request with a detailed description of your changes.
Follow these steps to set up your local development environment for contributing to ngx-smart-forms.
-
Fork the repository to your GitHub account by clicking the "Fork" button on the project page.
-
Clone your forked repository to your local machine:
git clone https://github.com/YOUR_USERNAME/ngx-smart-forms.git cd ngx-smart-forms
-
Add the upstream repository to keep your fork up to date:
git remote add upstream https://github.com/AditechGH/ngx-smart-forms.git
After cloning the repository, install the required dependencies:
npm install
or
yarn install
The repository includes a demo app to showcase the libraries. You can run this app to test the libraries locally:
npm run start
The app will be available at http://localhost:4200/ngx-smart-forms
To build all libraries in the monorepo, use:
npm run build
To build a specific library, such as smart-error-display
:
npm run build:smart-error-display
To ensure the quality of your contributions, all code should be thoroughly tested. Run tests across the entire workspace:
npm run test
To run tests for a specific library:
npm run test:smart-error-display
We follow specific coding standards to maintain consistency across the project. Please adhere to the following guidelines.
Ensure your code passes lint checks before submitting a pull request. Linting helps catch stylistic and formatting errors:
npm run lint
You can also lint a specific library:
npm run lint:smart-error-display
We use Conventional Commits for commit messages to enforce consistency and automate versioning. Please follow these guidelines for your commit messages:
- fix: For bug fixes.
- feat: For new features.
- docs: For documentation changes.
- style: For code formatting changes (no code logic).
- refactor: For code restructuring (no feature or bug fix).
- test: For adding or improving tests.
- chore: For small tasks, such as updating dependencies.
Example:
feat: add custom validation to smart-error-display
- Added support for custom validators in smart-error-display.
- Updated README with usage examples.
- Wrote unit tests for the new feature.
Once your changes are ready, submit a pull request (PR) to the main branch. The following checklist should be completed before creating the PR:
- Ensure your code is thoroughly tested and passes all unit tests.
- Run the linting tool and resolve any lint errors.
- Make sure your code follows the project’s coding standards and guidelines.
- If your change introduces a new feature or modifies existing functionality, update the relevant documentation.
- Submit the pull request with a detailed description of the changes and a link to any related issues or feature requests.
Our team will review the PR and provide feedback or merge the changes. We strive to review pull requests as quickly as possible, but please be patient if it takes a little time.
By contributing to ngx-smart-forms, you agree that your contributions will be licensed under the MIT License. For more information, see the LICENSE file.