Thank you for considering contributing to ngx-json-treeview!
Please be respectful and professional in all interactions.
- Node.js (check
package.jsonfor recommended versions) - pnpm (the project uses pnpm for package management)
-
Clone the repository:
git clone https://github.com/MichaelDoyle/ngx-json-treeview.git cd ngx-json-treeview -
Install dependencies:
pnpm install
This project is organized as an Angular workspace with two main projects:
ngx-json-treeview: The core library (located inprojects/ngx-json-treeview).demo: A sample application used for manual testing and demonstration (located inprojects/demo).
To start the demo application and see your changes in real-time:
pnpm startThis will serve the demo app at http://localhost:4200/. The demo app is configured to use the library from the source, so changes to the library will trigger a reload.
We use Jasmine and Karma for unit testing. To run the tests for the library:
pnpm testPlease ensure that all tests pass before submitting a pull request. If you are adding a new feature, please include corresponding unit tests.
This project uses Prettier for code formatting. You can check for formatting issues or fix them automatically:
# Check for formatting issues
pnpm run format:check
# Fix formatting issues
pnpm run format-
Create a Branch: Create a new branch for your feature or bug fix.
git checkout -b my-feature-branch
-
Commit Your Changes: Make your changes and commit them using Conventional Commits.
Example:
feat: add support for custom value click handlersCommon types include:
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools and libraries such as documentation generation
-
Push Your Branch:
git push origin my-feature-branch
-
Open a Pull Request: Submit your pull request to the
mainbranch. Provide a clear description of the changes and link to any related issues.
- Keep it Focused: A pull request should ideally do one thing. If you have multiple unrelated changes, please split them into separate PRs.
- Update Documentation: If your changes introduce new features or change existing behavior, please update the
README.mdas necessary. - Test Your Changes: Ensure that your changes are well-tested and don't break existing functionality.
If you have any questions or need further clarification, feel free to open an issue or reach out to the maintainers.