Update extend-cart-checkout-block dependency (#37191)
This commit is contained in:
commit
96a1e9cd7b
|
@ -0,0 +1,3 @@
|
|||
// Import the default config file and expose it in the project root.
|
||||
// Useful for editor integrations.
|
||||
module.exports = require( '@wordpress/prettier-config' );
|
|
@ -105,7 +105,7 @@ class {{slugPascalCase}}_Blocks_Integration implements IntegrationInterface {
|
|||
|
||||
$style_url = plugins_url( $style_path, __FILE__ );
|
||||
wp_enqueue_style(
|
||||
'{{slug}}-blocks-integration',
|
||||
'{{slug}}-checkout-newsletter-subscription-block',
|
||||
$style_url,
|
||||
[],
|
||||
$this->get_file_version( $style_path )
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
# WordPress Coding Standards
|
||||
# https://make.wordpress.org/core/handbook/coding-standards/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = tab
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.txt]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{md,json,yml}]
|
||||
trim_trailing_whitespace = false
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.json]
|
||||
indent_style = tab
|
|
@ -0,0 +1 @@
|
|||
16.13.2
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"phpVersion": null,
|
||||
"core": null,
|
||||
"plugins": [
|
||||
"https://downloads.wordpress.org/plugin/woocommerce.latest-stable.zip",
|
||||
"https://downloads.wordpress.org/plugin/woo-gutenberg-products-block.latest-stable.zip",
|
||||
"."
|
||||
],
|
||||
"config": {
|
||||
"JETPACK_AUTOLOAD_DEV": true,
|
||||
"WP_DEBUG": true,
|
||||
"SCRIPT_DEBUG": true
|
||||
}
|
||||
}
|
|
@ -3,12 +3,29 @@
|
|||
This is a template to be used with `@wordpress/create-block` to create a WooCommerce Blocks extension starting point.
|
||||
|
||||
## Installation
|
||||
|
||||
From your `plugins` directory run:
|
||||
```
|
||||
|
||||
```sh
|
||||
npx @wordpress/create-block -t @woocommerce/extend-cart-checkout-block your_extension_name
|
||||
```
|
||||
|
||||
When this has completed, go to your WordPress plugins page and activate the plugin.
|
||||
|
||||
Add some items to your cart and visit the Checkout block, notice there is additional data on the block that this
|
||||
template has added.
|
||||
Add some items to your cart and visit the Checkout block, notice there is additional data on the block that this template has added.
|
||||
|
||||
### Installing `wp-prettier` (optional)
|
||||
|
||||
WooCommerce Blocks uses `wp-prettier` to format the JS files. If you want to use `wp-prettier`, you will need to run the following command:
|
||||
|
||||
```sh
|
||||
nvm use && npm i --D "prettier@npm:wp-prettier@latest"
|
||||
```
|
||||
|
||||
### Installing `wp-env` (optional)
|
||||
|
||||
`wp-env` lets you easily set up a local WordPress environment for building and testing your extension. If you want to use `wp-env`, you will need to run the following command:
|
||||
|
||||
```sh
|
||||
nvm use && npm i -D @wordpress/env && npm set-script wp-env "wp-env"
|
||||
```
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
This patch includes the following changes:
|
||||
|
||||
- Add `prettier:npm:wp-prettier@2.6.2`
|
||||
- Add `.wp-env`
|
||||
- Add `.nvmrc`
|
||||
- Correct CSS handle of newsletter subscription block
|
||||
- Correct metadata category of newsletter subscription block
|
|
@ -4,6 +4,8 @@ module.exports = {
|
|||
npmDevDependencies: [
|
||||
'@woocommerce/dependency-extraction-webpack-plugin',
|
||||
'@woocommerce/eslint-plugin',
|
||||
'@wordpress/prettier-config',
|
||||
'@wordpress/scripts',
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "{{slug}}/checkout-newsletter-subscription",
|
||||
"version": "2.0.0",
|
||||
"title": "Newsletter Subscription!",
|
||||
"category": "{{slug}}",
|
||||
"category": "woocommerce",
|
||||
"description": "Adds a newsletter subscription checkbox to the checkout.",
|
||||
"supports": {
|
||||
"html": false,
|
||||
|
|
|
@ -61,8 +61,7 @@ module.exports = {
|
|||
|
||||
// Add code here to prepend to all .scss/.sass files.
|
||||
return (
|
||||
'@import "_colors"; ' +
|
||||
content
|
||||
'@import "colors"; ' + content
|
||||
);
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue