2db29164f9
* Update to pnpm 9.1 and fix a mini css bug * Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai * temporarily disable swallowing build output to diagnose issue with perf workflow * Ignore some type issues that commonly resurface when deps slightly change * Fix persistent type issues that have recurred many times * Add more ignores * Fix lint issue * Revert change to swallow build error * Improve access of the config that needs updated build dir. --------- Co-authored-by: github-actions <github-actions@github.com> |
||
---|---|---|
.. | ||
changelog | ||
includes/admin | ||
languages | ||
src | ||
tests | ||
$slug.php.mustache | ||
.editorconfig.mustache | ||
.eslintrc.js.mustache | ||
.gitignore.mustache | ||
.prettierrc.json.mustache | ||
.wp-env.json.mustache | ||
CHANGELOG.md | ||
README.md | ||
README.md.mustache | ||
composer.json | ||
composer.json.mustache | ||
composer.lock | ||
index.js | ||
package.json | ||
webpack.config.js.mustache |
README.md
@woocommerce/create-woo-extension
Create Woo Extension scaffolds a fully functional modern development environment for integrating with WooCommerce. Use it to build extensions leveraging the power of WooCommerce.
Configuration Free
With build tooling already configured, getting started developing modern Javascript screens requires no effort. Create Woo Extension adds a React page integrating with WooCommerce Admin. Also included are PHP and Javascript unit testing, linting, and Prettier IDE confguration for WooCommerce and WordPress.
Add a project inside of your favorite environment setup or use the built in wp-env for easily setting up a local WordPress environment for building and testing plugins and themes. wp-env
is configured to load the latest WooCommerce to easily start developing with a single command.
Usage
npx @wordpress/create-block -t @woocommerce/create-woo-extension my-extension-name
Navigate to the newly created folder and get started.
cd my-extension-name
npm install # Install dependencies
npm run build # Build the javascript
npm -g i @wordpress/env # If you don't already have wp-env
wp-env start # Start Wordpress environment
See the new plugin activated from the WordPress plugins page and navigate to http://localhost:8888/wp-admin/admin.php?page=wc-admin&path=%2Fmy-extension-name to check it out.
Development
For development on this tool itself, you can also install from a local directory.
npx @wordpress/create-block -t ./path/to/woocommerce/packages/js/create-woo-extension my-extension-name
This is a template to used with @wordpress/create-block
to create a WooCommerce Extension starting point.