Thank you for your interest in contributing to GrapesJS! We welcome all types of contributions, including bug reports, feature suggestions, documentation improvements, and code contributions.
- Node.js (version 20 LTS)
- pnpm (version 9.10.0 or later)
-
Install Node.js 20 LTS:
nvm install 20 nvm use 20
-
Install pnpm globally:
npm install -g [email protected]
-
Clone the repository:
git clone https://github.com/GrapesJS/grapesjs.git cd grapesjs
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm start
-
Open
https://localhost:8080/
in your browser to see the editor in action.
- Linting:
pnpm lint
- Formatting:
pnpm format
- Checking format:
pnpm format:check
- Building:
pnpm build
- Testing:
pnpm test
We use ESLint for linting and Prettier for code formatting. While we don't have pre-commit hooks, we strongly recommend using these tools before submitting your changes:
- Run
pnpm lint
to check for linting errors. - Run
pnpm format
to automatically format your code. - Run
pnpm format:check
to check if your code is formatted correctly.
Code style is enforced at the CI level. We recommend using Prettier extensions in your editor for real-time formatting.
To generate and view the documentation:
-
Generate API documentation:
pnpm run docs:api
-
Run the VuePress documentation server:
pnpm run docs
-
Open
https://localhost:8080/
to view the documentation.
When submitting a pull request:
- Target your PR to the
dev
branch. - Clearly describe the problem and solution.
- Include the relevant issue number if applicable.
- Add tests for new features or bug fixes.
If you're a first-time contributor, consider starting a discussion or opening an issue related to your changes before submitting a PR. This helps with collaboration and prevents duplicate work.
If you have any questions, please open an issue or start a discussion. Search existing issues and discussions first to avoid duplicates.
Your contributions to open source, no matter how small, make projects like GrapesJS possible. Thank you for taking the time to contribute.