Add Client Components Documentation To WooCommerce Core (#33507)

This commit adds documentation for WooCommerce's client component commands. This should make it easier to know what commands to run to work in these components.
This commit is contained in:
Christopher Allford 2022-06-17 15:32:29 -07:00 committed by GitHub
parent c0b76f70cc
commit 71456382c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 0 deletions

View File

@ -28,6 +28,50 @@ pnpm -- wp-env start
You should now be able to visit http://docker.local:8888/ and access WooCommerce environment.
## Building Components
There are two major client-side components included in WooCommerce Core that can be built, linted, and tested independently. We've organized these components
in this way to take advantage of caching to prevent unnecessarily performing expensive rebuilds when only working in one of them.
### `plugins/woocommerce/client/legacy`
This directory contains the CSS and jQuery code for WooCommerce.
```bash
# Build the assets.
pnpm -- turbo run build --filter=woocommerce/client/legacy
# Lint the assets.
pnpm -- turbo run lint --filter=woocommerce/client/legacy
```
### `plugins/woocommerce-admin`
This directory contains the React-based admin interface.
```bash
# Build the React-based admin client.
pnpm -- turbo run build --filter=woocommerce/client/admin
# Lint the React-based admin client.
pnpm -- turbo run lint --filter=woocommerce/client/admin
# Test the React-based admin client.
pnpm -- turbo run test --filter=woocommerce/client/admin
```
#### Helper Scripts
Here is a collection of scripts that can help when developing the React-based admin interface.
```bash
# Create a develoment build of the React-based admin client.
pnpm dev --filter=woocommerce/client/admin
# Create and watch a development build of the React-based admin client.
pnpm start --filter=woocommerce/client/admin
# Watch the tests of the React-based admin client.
pnpm test:watch --filter=woocommerce/client/admin
# Run a type check over the React-based admin client's TypeScript files.
pnpm ts:check --filter=woocommerce/client/admin
```
## Documentation
* [WooCommerce Documentation](https://docs.woocommerce.com/)
* [WooCommerce Developer Documentation](https://github.com/woocommerce/woocommerce/wiki)

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Documentation update