@wordpress/create-block-interactive-template 1.11.0 → 1.12.1-next.79a6196f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -5
- package/LICENSE.md +1 -1
- package/README.md +2 -0
- package/block-templates/render.php.mustache +0 -5
- package/index.js +6 -0
- package/package.json +2 -2
- package/plugin-templates/$slug.php.mustache +1 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,20 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 1.12.0-next.0 (2024-01-11)
|
|
6
|
+
|
|
7
|
+
### Enhancement
|
|
8
|
+
|
|
9
|
+
- Update the template to use `viewModule` in block.json ([#57712](https://github.com/WordPress/gutenberg/pull/57712)).
|
|
10
|
+
|
|
5
11
|
## 1.11.0 (2023-12-13)
|
|
6
12
|
|
|
7
|
-
- Add all files to the generated plugin zip
|
|
8
|
-
- Prevent crash when Gutenberg plugin is not installed
|
|
13
|
+
- Add all files to the generated plugin zip ([#56943](https://github.com/WordPress/gutenberg/pull/56943)).
|
|
14
|
+
- Prevent crash when Gutenberg plugin is not installed ([#56941](https://github.com/WordPress/gutenberg/pull/56941)).
|
|
9
15
|
|
|
10
16
|
## 1.10.1 (2023-12-07)
|
|
11
17
|
|
|
12
|
-
- Update template to use modules instead of scripts
|
|
18
|
+
- Update template to use modules instead of scripts ([#56694](https://github.com/WordPress/gutenberg/pull/56694)).
|
|
13
19
|
|
|
14
20
|
## 1.10.0 (2023-11-29)
|
|
15
21
|
|
|
16
22
|
### Enhancement
|
|
17
23
|
|
|
18
|
-
- Update `view.js` and `render.php` templates to the new `store()` API
|
|
24
|
+
- Update `view.js` and `render.php` templates to the new `store()` API ([#56613](https://github.com/WordPress/gutenberg/pull/56613)).
|
|
19
25
|
|
|
20
26
|
## 1.9.0 (2023-11-16)
|
|
21
27
|
|
|
@@ -35,4 +41,4 @@
|
|
|
35
41
|
|
|
36
42
|
### Enhancement
|
|
37
43
|
|
|
38
|
-
- Moves the `example` property into block.json by leveraging changes to create-block to now support `example
|
|
44
|
+
- Moves the `example` property into block.json by leveraging changes to create-block to now support `example` ([#52801](https://github.com/WordPress/gutenberg/pull/52801)).
|
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ This block template can be used by running the following command:
|
|
|
10
10
|
npx @wordpress/create-block --template @wordpress/create-block-interactive-template
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
It requires Gutenberg 17.5 or higher.
|
|
14
|
+
|
|
13
15
|
## Contributing to this package
|
|
14
16
|
|
|
15
17
|
This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.
|
package/index.js
CHANGED
|
@@ -14,8 +14,14 @@ module.exports = {
|
|
|
14
14
|
supports: {
|
|
15
15
|
interactivity: true,
|
|
16
16
|
},
|
|
17
|
+
viewScript: null,
|
|
18
|
+
viewModule: 'file:./view.js',
|
|
17
19
|
render: 'file:./render.php',
|
|
18
20
|
example: {},
|
|
21
|
+
customScripts: {
|
|
22
|
+
build: 'wp-scripts build --experimental-modules',
|
|
23
|
+
start: 'wp-scripts start --experimental-modules',
|
|
24
|
+
},
|
|
19
25
|
},
|
|
20
26
|
variants: {
|
|
21
27
|
basic: {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/create-block-interactive-template",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1-next.79a6196f.0",
|
|
4
4
|
"description": "Template for @wordpress/create-block to create interactive blocks with the Interactivity API.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "1e74b942ac0119a22ceaaf5c9594263f3ec516ab"
|
|
26
26
|
}
|
|
@@ -42,15 +42,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
|
42
42
|
* @see https://developer.wordpress.org/reference/functions/register_block_type/
|
|
43
43
|
*/
|
|
44
44
|
function {{namespaceSnakeCase}}_{{slugSnakeCase}}_block_init() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (function_exists('gutenberg_register_module')) {
|
|
48
|
-
gutenberg_register_module(
|
|
49
|
-
'{{namespace}}-view',
|
|
50
|
-
plugin_dir_url( __FILE__ ) . 'src/view.js',
|
|
51
|
-
array( '@wordpress/interactivity' ),
|
|
52
|
-
'{{version}}'
|
|
53
|
-
);
|
|
54
|
-
}
|
|
45
|
+
register_block_type_from_metadata( __DIR__ . '/build' );
|
|
55
46
|
}
|
|
56
47
|
add_action( 'init', '{{namespaceSnakeCase}}_{{slugSnakeCase}}_block_init' );
|