Contributing to ngx-tw
September 3, 2025 ยท View on GitHub
We love your input! We want to make contributing to ngx-tw as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
Development Process
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
Pull Requests
- Fork the repo and create your branch from
main - If you've added code that should be tested, add tests
- If you've changed APIs, update the documentation
- Ensure the test suite passes
- Make sure your code lints
- Issue that pull request!
Conventional Commits
We use conventional commits for automatic versioning. Please format your commit messages as follows:
feat: add new component- New features (minor version bump)fix: resolve button click issue- Bug fixes (patch version bump)feat!: change component API- Breaking changes (major version bump)docs: update README- Documentation (no version bump)style: fix formatting- Code style (no version bump)refactor: improve code structure- Refactoring (no version bump)test: add component tests- Tests (no version bump)chore: update dependencies- Maintenance (no version bump)
Development Setup
- Clone the repository:
git clone https://github.com/bugMaker-237/ngx-tw.git
cd ngx-tw
- Install dependencies:
npm install
- Start the development server:
npm run demo
- Run tests:
npm run test:lib
- Build the library:
npm run build:lib
Component Development Guidelines
-
File Structure: Each component should have its own folder with:
component-name.component.tscomponent-name.component.html(if needed)component-name.component.scss(if needed)component-name.interface.ts(if applicable)index.ts(for exports)
-
Styling: Use Tailwind CSS classes. Add custom styles to the main SCSS files in
/styles/components/ -
Accessibility: Ensure components follow WCAG guidelines:
- Proper ARIA attributes
- Keyboard navigation
- Screen reader support
- Focus management
-
Testing: Write unit tests for each component covering:
- Basic rendering
- Input/output behavior
- User interactions
- Edge cases
Adding New Components
- Create component in
projects/ngx-tw/src/lib/your-component/ - Export it in
projects/ngx-tw/src/public-api.ts - Add it to the demo app in
projects/demo/src/app/components/ - Update the README with documentation
- Add appropriate tests
Publishing
The package is automatically published to NPM when changes are merged to the main branch. The CI/CD pipeline will:
- Run tests
- Build the library
- Bump version based on conventional commits
- Publish to NPM
- Create a GitHub release
Code of Conduct
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Questions?
Feel free to open an issue for any questions or concerns!