We welcome contributions to the CookieX WordPress plugin! This document provides guidelines for contributing to the project.
-
Clone the repository:
git clone https://github.com/cookiex-io/wp-plugin.git
-
Install dependencies:
composer install npm install
-
Set up the plugin development environment:
- Ensure you have a local WordPress installation.
- Symlink or copy the plugin directory to your WordPress plugins folder.
-
Create a zip file for deployment:
./build.sh
-
For admin interface development with hot reloading: in resources/admin/js/pages/SettingsPage.tsx, look for and follow the following instruction: "Uncomment following apiFetch for development mode". You can then:
npm run development
resources/
: Contains admin interface source filesadmin/
: Admin-related React components and styles
bud.config.js
: Configuration for Bud.jsindex.php
: Main plugin file
- Follow WordPress Coding Standards for PHP.
- Use ESLint for JavaScript and TypeScript.
- Use Prettier for code formatting.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with a clear, descriptive message.
- Push your branch and create a pull request.
- Use
npm run build
to create production-ready assets. - The build process is managed by Bud.js as configured in
bud.config.js
.
- Write unit tests for PHP code using PHPUnit.
- For React components, use Jest and React Testing Library.
- Ensure your code adheres to the project's coding standards.
- Update documentation if you're changing functionality.
- Include tests for new features or bug fixes.
- Make sure all tests pass before submitting.
- Use the GitHub issue tracker to report bugs or suggest features.
- Provide as much detail as possible, including steps to reproduce for bugs.
Thank you for contributing to CookieX wordpress plugin!