Updated How to set up WooCommerce development environment (markdown)

Chi-Hsuan Huang 2022-04-13 14:36:35 +08:00
parent 3e01514261
commit aa2dc79773
1 changed files with 19 additions and 0 deletions

@ -9,6 +9,7 @@ This page will guide you through the process of setting up WooCommerce developme
- [Configure a local WordPress instance with WP-ENV](#configure-a-local-wordpress-instance-with-wp-env)
- [Clone WooCommerce repository](#clone-woocommerce-repository)
- [Install dependencies and generate assets](#install-dependencies-and-generate-assets)
- [Run the lint tools](#run-the-lint-tools)
- [WooCommerce Admin Development](#wooCommerce-admin-development)
- [Debugging](#debugging)
- [IDE integrations](#ide-integrations)
@ -215,6 +216,24 @@ To trigger a one-time rebuild, run
pnpm nx build woocommerce-legacy-assets
```
## Run the lint tools
### Lint JS
```
pnpx nx lint:js woocommerce
```
### Lint PHP
```
cd plugins/woocommerce
composer run-script phpcs <file|folder>
# Standardize lint Executor https://github.com/woocommerce/woocommerce/issues/32554
pnpx nx lint:php woocommerce
```
## WooCommerce Admin Development
WooCommerce Admin is a dependency of WooCommerce, so when you build woocommerce via nx, it will automatically build the WooCommerce Admin.