Replace outdated readme examples of using pnpm (#35064)
This commit is contained in:
parent
6b85482f34
commit
9b9abd1eae
|
@ -26,23 +26,23 @@ Here are some examples of the ways you can use Turborepo / pnpm commands:
|
|||
pnpm run -r lint && pnpm run build
|
||||
|
||||
# Build WooCommerce Core and all of its dependencies
|
||||
pnpm run build --filter='woocommerce'
|
||||
pnpm run --filter='woocommerce' build
|
||||
|
||||
# Lint the @woocommerce/components package - note the different argument order, turbo scripts
|
||||
# are not running lints at this point in time.
|
||||
pnpm run -r --filter='@woocommerce/components' lint
|
||||
|
||||
# Test all of the @woocommerce scoped packages
|
||||
pnpm run test --filter='@woocommerce/*'
|
||||
pnpm run --filter='@woocommerce/*' test
|
||||
|
||||
# Build all of the JavaScript packages
|
||||
pnpm run build --filter='./packages/js/*'
|
||||
pnpm run --filter='./packages/js/*' build
|
||||
|
||||
# Build everything except WooCommerce Core
|
||||
pnpm run build --filter='!woocommerce'
|
||||
pnpm run --filter='!woocommerce' build
|
||||
|
||||
# Build everything that has changed since the last commit
|
||||
pnpm run build --filter='[HEAD^1]'
|
||||
pnpm run --filter='[HEAD^1]' build
|
||||
```
|
||||
|
||||
### Cache busting Turbo
|
||||
|
@ -53,7 +53,7 @@ e.g.
|
|||
|
||||
```bash
|
||||
# Force an uncached build of WooCommerce Core and all of its dependencies
|
||||
TURBO_FORCE=true pnpm run build --filter='woocommerce'
|
||||
TURBO_FORCE=true pnpm run --filter='woocommerce' build
|
||||
```
|
||||
|
||||
## Other Commands
|
||||
|
|
|
@ -19,7 +19,7 @@ Please make sure you follow the [repository's getting started guide](../../READM
|
|||
|
||||
```bash
|
||||
# Make sure that WooCommerce Core and all of its dependencies are built
|
||||
pnpm run build --filter=woocommerce
|
||||
pnpm run --filter=woocommerce build
|
||||
# Make sure you're in the WooCommerce Core directory
|
||||
cd plugins/woocommerce
|
||||
# Start the development environment
|
||||
|
@ -39,9 +39,9 @@ This directory contains the CSS and jQuery code for WooCommerce.
|
|||
|
||||
```bash
|
||||
# Build the assets.
|
||||
pnpm run build --filter=woocommerce/client/legacy
|
||||
pnpm run --filter=woocommerce/client/legacy build
|
||||
# Lint the assets.
|
||||
pnpm run lint --filter=woocommerce/client/legacy
|
||||
pnpm run --filter=woocommerce/client/legacy lint
|
||||
```
|
||||
|
||||
### `plugins/woocommerce-admin`
|
||||
|
@ -50,11 +50,11 @@ This directory contains the React-based admin interface.
|
|||
|
||||
```bash
|
||||
# Build the React-based admin client.
|
||||
pnpm run build --filter=woocommerce/client/admin
|
||||
pnpm run --filter=woocommerce/client/admin build
|
||||
# Lint the React-based admin client.
|
||||
pnpm run lint --filter=woocommerce/client/admin
|
||||
pnpm run --filter=woocommerce/client/admin lint
|
||||
# Test the React-based admin client.
|
||||
pnpm run test --filter=woocommerce/client/admin
|
||||
pnpm run --filter=woocommerce/client/admin test
|
||||
```
|
||||
|
||||
#### Helper Scripts
|
||||
|
@ -63,13 +63,13 @@ Here is a collection of scripts that can help when developing the React-based ad
|
|||
|
||||
```bash
|
||||
# Create a develoment build of the React-based admin client.
|
||||
pnpm dev --filter=woocommerce/client/admin
|
||||
pnpm --filter=woocommerce/client/admin dev
|
||||
# Create and watch a development build of the React-based admin client.
|
||||
pnpm start --filter=woocommerce/client/admin
|
||||
pnpm --filter=woocommerce/client/admin start
|
||||
# Watch the tests of the React-based admin client.
|
||||
pnpm test:watch --filter=woocommerce/client/admin
|
||||
pnpm --filter=woocommerce/client/admin test:watch
|
||||
# Run a type check over the React-based admin client's TypeScript files.
|
||||
pnpm ts:check --filter=woocommerce/client/admin
|
||||
pnpm --filter=woocommerce/client/admin ts:check
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: This is just a documentation change
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ export const scanForChanges = async (
|
|||
// Note doing the minimal work to get a DB scan to work, avoiding full build for speed.
|
||||
await execAsync( 'composer install', { cwd: pluginPath } );
|
||||
await execAsync(
|
||||
'pnpm run build:feature-config --filter=woocommerce',
|
||||
'pnpm run --filter=woocommerce build:feature-config',
|
||||
{
|
||||
cwd: pluginPath,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue