create-block-theme/CONTRIBUTING.md
2024-02-20 08:30:39 -05:00

2.9 KiB

Contributing Guidelines

Welcome to Create Block Theme! All are welcome here.

How can I contribute?

We welcome contributions in all forms, including code, design, documentation, and triage.

Development Setup

The basic setup for development is:

  • Node/NPM Development Tools
  • WordPress Development Site
  • Code Editor

Prerequisites

We recommend following the Gutenberg code contribution guide for more details on setting up a development environment.

Code Setup

Fork the Create Block Theme repository, clone it to your computer and add the WordPress repository as upstream

git clone https://github.com/YOUR_GITHUB_USERNAME/create-block-theme.git
cd create-block-theme
git remote add upstream https://github.com/WordPress/create-block-theme.git

Run the following commands to install the plugin dependencies:

npm install
composer install

Run npm run build to build the plugin.

There are several linter commands available to help ensure the plugin follows the WordPress coding standards:

  • CSS: npm run lint:css & npm run lint:css:fix
  • JS: npm run lint:js & npm run lint:js:fix
  • PHP: npm run lint:php & npm run lint:php:fix

To test a WordPress plugin, you need to have WordPress itself installed. If you already have a WordPress environment setup, use the above Create Block Theme build as a standard WordPress plugin by putting the create-block-theme directory in your wp-content/plugins/ directory.

Guidelines

  • As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our Code of Conduct.

  • Contributors should follow WordPress' coding standards and accessibility coding standards.

  • You maintain copyright over any contribution you make. By submitting a pull request you agree to release that code under the plugin's License.