2.6 KiB
Contribute to GrapesJS
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.
Quick Start
Prerequisites
- Node.js (version 20 LTS)
- pnpm (version 9.10.0 or later)
Setup
-
Install Node.js 20 LTS:
nvm install 20 nvm use 20 -
Install pnpm globally:
npm install -g pnpm@9.10.0 -
Clone the repository:
git clone https://github.com/GrapesJS/grapesjs.git cd grapesjs -
Install dependencies:
pnpm install -
Run the build script:
pnpm run build -
Start the development server:
pnpm start -
Open
http://localhost:8080/in your browser to see the editor in action.
Development Workflow
- Linting:
pnpm lint - Formatting:
pnpm format - Checking format:
pnpm format:check - Building:
pnpm build - Testing:
pnpm test
Code Style
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 lintto check for linting errors. - Run
pnpm formatto automatically format your code. - Run
pnpm format:checkto 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.
Documentation
To generate and view the documentation:
-
Generate API documentation:
pnpm run docs:api -
Run the VuePress documentation server:
pnpm run docs -
Open
http://localhost:8080/to view the documentation.
Pull Requests
When submitting a pull request:
- Target your PR to the
devbranch. - 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.
Questions?
If you have any questions, please open an issue or start a discussion. Search existing issues and discussions first to avoid duplicates.
Thank You
Your contributions to open source, no matter how small, make projects like GrapesJS possible. Thank you for taking the time to contribute.