Thank you for considering contributing to PigmentTS! We welcome all types of contributions, from bug reports and new features to documentation improvements. Please read the following guidelines before contributing.
If you encounter any bugs or issues, please report them in the GitHub Issues with the following details:
- Describe the bug: Provide a concise description of the problem.
- Steps to reproduce: Outline the steps to replicate the issue.
- Expected behavior: What should happen instead?
- Screenshots or code snippets: If applicable, provide additional context.
We’re always open to new ideas! You can suggest new features or enhancements by creating a GitHub issue. Make sure to include:
- Feature description: Explain the feature and how it improves PigmentTS.
- Use cases: Describe scenarios where the feature would be useful.
- Examples: If possible, provide examples of the feature in action.
We welcome pull requests (PRs) for new features, bug fixes, and documentation improvements. Please follow these steps:
- Fork the repository: Clone it to your local machine.
- Create a new branch: Use a descriptive name for your branch (e.g.,
fix/color-conversion
,feat/format-support
). - Make changes: Implement your feature or fix.
- Test your changes: Make sure all tests pass and new features are properly tested.
- Format your code: Run
npm run format
to format your code using Prettier. - Commit your changes: Use a concise, clear commit message.
- Submit a pull request: Make sure to explain your changes clearly in the PR description.
Good documentation is essential for any project. If you find any inconsistencies or want to add new examples or tutorials, feel free to contribute.
- TypeScript first: Ensure the code is written in TypeScript. If you're introducing a new feature, make sure the types are well defined.
- ESLint: We use ESLint to enforce code style. Please ensure your code passes linting.
- Formatting: Run
npm run format
to format your code using Prettier. - Testing: Write tests for any new features or bug fixes. We use Jest for testing, so make sure your tests cover all relevant cases.
Clone the repository
git clone https://github.com/Jay-Karia/pigment-ts
cd pigment-ts
Install dependencies
npm install
Build the project
npm run build
See changes in action
Open node
in terminal and import the module
node
> const PigmentTS = require('./dist/index.js');
> PigmentTS.randomColor("hex");
Run tests
npm run test