🎉 Thank you for your interest in contributing to Freemius Checkout JS! We welcome contributions of all kinds, including code, documentation, issues, and discussions. Please read through these guidelines to ensure a smooth contribution process. 🎉
By participating in this project, you agree to abide by the Contributor Covenant Code of Conduct. We aim to create a welcoming and inclusive community where everyone can contribute, regardless of experience or background.
If you find a bug or have a feature request, feel free to open an issue. Make sure to provide enough details to help others understand and reproduce the issue.
- Search existing issues before opening a new one to avoid duplicates.
- Use a clear and descriptive title.
- If you're reporting a bug, include steps to reproduce the problem, expected behavior, and the actual outcome.
We encourage you to contribute to the codebase by submitting a pull request (PR). Here's the process:
- Fork the repository: Fork the repo and clone it to your local machine.
- Branch from
develop
: All contributions should be based on thedevelop
branch.- Run
git checkout develop
and create a new branch with a meaningful name:git checkout develop git checkout -b feature/new-awesome-feature
- Run
- Make your changes: Write clean, efficient, and well-documented code.
- Run tests: Ensure that all tests pass before submitting.
- Submit your PR: Push your changes to your fork and create a pull request
against the
develop
branch. Include a detailed description of what your PR does and reference related issues if applicable.- We will review the PR as soon as possible. You may be asked to make revisions based on feedback.
We welcome ideas and discussions! If you'd like to talk about future improvements, ideas for new features, or general questions, feel free to start a feature request.
-
Set up the project:
- Clone your fork of the repository and install dependencies:
git clone https://github.com/YOUR-USERNAME/freemius-checkout-js.git cd freemius-checkout-js npm ci
- Create the
.env
file and set the required environment variables:If you're a Freemius team member, you will find it useful to set thecp .env.sample .env.development.local
VITE_CHECKOUT_BASE_URL
to the internal development URL. See vite documentation to learn about how.env
files are handled. - Run the development server:
The development server will start at
npm run dev
http://localhost:5173/
.
- Clone your fork of the repository and install dependencies:
-
Work on your feature or fix:
- Make sure to work in your feature branch created from
develop
. - Follow the coding standards and practices of the project.
- Make sure to work in your feature branch created from
-
Testing:
- Run tests to ensure nothing is broken:
npm test
- Write new tests if you're adding a new feature or fixing a bug.
- Run tests to ensure nothing is broken:
-
Running Linters: Ensure that your code adheres to the project's style guide.
npm run lint npm run prettier:check
If you do not have Prettier configured to format your code on save, you can run
npm run prettier:write
to format your code. -
Submit your work:
- After your work is complete, create a pull request as outlined above.
We follow standard JavaScript coding conventions and aim to keep our codebase consistent. Please ensure that your contributions conform to these standards:
- Use ES6 syntax where applicable.
- Use 4 spaces for indentation.
- Write meaningful commit messages.
- Keep code modular and documented.
We use Prettier to enforce consistent code formatting. The project uses 4 spaces for indentation. To ensure that your contributions adhere to our style, please configure Prettier to automatically format your code on save.