Renamed `woocommerce/client/admin` Package

NPM package names _must_ either be single-word or have
a scope. The current structure is unsupported and has been
changed. The new package name is `@woocommerce/admin-library`.
This commit is contained in:
Christopher Allford 2023-10-23 13:08:03 -07:00
parent 3c711e6d8e
commit 6d685e5185
7 changed files with 15 additions and 14 deletions

View File

@ -130,7 +130,7 @@
"packages": [
"@woocommerce/block-templates",
"@woocommerce/product-editor",
"woocommerce/client/admin",
"@woocommerce/admin-library",
"@woocommerce/components"
],
"isIgnored": true

View File

@ -14,7 +14,7 @@ Build the example extension by running the pnpm script and passing the example n
```bash
WC_EXT=<example> pnpm --filter=woocommerce/client/admin example
WC_EXT=<example> pnpm --filter=@woocommerce/admin-library example
```
You should see a new directory in `./woocommerce/plugins/{example} path.` Include the output plugin in your `.wp-env.json` or `.wp-env.override.json` and restart the WordPress instance. WooCommerce will now reflect the changes made by the example extension.

View File

@ -10,7 +10,7 @@ This feature is hidden behind a feature flag and can be turned on or off by visi
The fastest way to get started is by creating an example plugin from WooCommerce Admin. Enter the following command:
`WC_EXT=add-navigation-items pnpm example --filter=woocommerce/client/admin`
`WC_EXT=add-navigation-items pnpm example --filter=@woocommerce/admin-library`
This will create a new plugin that covers various features of the navigation and helps to register some initial items and categories within the new navigation menu. After running the command above, you can make edits directly to the files at `docs/examples/extensions/add-navigation-items` and they will be built and copied to your `wp-content/add-navigation-items` folder on save.

View File

@ -10,7 +10,7 @@ Gateway suggestions are retrieved from a REST API and can be added via a remote
To quickly get started with an example plugin, run the following:
`WC_EXT=payment-gateway-suggestions pnpm example --filter=woocommerce/client/admin`
`WC_EXT=payment-gateway-suggestions pnpm example --filter=@woocommerce/admin-library`
This will create a new plugin that when activated will add two new gateway suggestions. The first is a simple gateway demonstrating how configuration fields can be pulled from the gateway class to create a configuration form. The second gateway shows a more customized approach via SlotFill.

View File

@ -1,5 +1,6 @@
{
"name": "woocommerce/client/admin",
"name": "@woocommerce/admin-library",
"private": true,
"version": "3.3.0",
"license": "GPL-3.0-or-later",
"author": "Automattic",

View File

@ -47,11 +47,11 @@ This directory contains the React-based admin interface.
```bash
# Build the React-based admin client.
pnpm run --filter=woocommerce/client/admin build
pnpm run --filter=@woocommerce/admin-library build
# Lint the React-based admin client.
pnpm run --filter=woocommerce/client/admin lint
pnpm run --filter=@woocommerce/admin-library lint
# Test the React-based admin client.
pnpm run --filter=woocommerce/client/admin test
pnpm run --filter=@woocommerce/admin-library test
```
#### Helper Scripts
@ -60,13 +60,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 --filter=woocommerce/client/admin dev
pnpm --filter=@woocommerce/admin-library dev
# Create and watch a development build of the React-based admin client.
pnpm --filter=woocommerce/client/admin start
pnpm --filter=@woocommerce/admin-library start
# Watch the tests of the React-based admin client.
pnpm --filter=woocommerce/client/admin test:watch
pnpm --filter=@woocommerce/admin-library test:watch
# Run a type check over the React-based admin client's TypeScript files.
pnpm --filter=woocommerce/client/admin ts:check
pnpm --filter=@woocommerce/admin-library ts:check
```
## Documentation

View File

@ -36,7 +36,7 @@
"dependsOn": [
"build:feature-config",
"^turbo:build",
"woocommerce/client/admin#turbo:build",
"@woocommerce/admin-library#turbo:build",
"woocommerce/client/legacy#turbo:build"
],
"outputs": [],
@ -63,7 +63,7 @@
"outputMode": "new-only"
},
"woocommerce/client/admin#turbo:build": {
"@woocommerce/admin-library#turbo:build": {
"dependsOn": [
"build:feature-config",
"^turbo:build"