diff --git a/docs/getting-started/create-block/README.md b/docs/getting-started/create-block/README.md index 051f1141e7424c..ae56e4b123f0e9 100644 --- a/docs/getting-started/create-block/README.md +++ b/docs/getting-started/create-block/README.md @@ -15,7 +15,7 @@ The `@wordpress/create-block` package exists to create the necessary block scaff From your plugins directory, to create your block run: ```sh -npx @wordpress/create-block gutenpride +npx @wordpress/create-block gutenpride --template @wordpress/create-block-tutorial-template ``` The [npx command](https://docs.npmjs.com/cli/v8/commands/npx) runs a command from a remote package, in this case our create-block package that will create a new directory called `gutenpride`, installs the necessary files, and builds the block plugin. If you want an interactive mode that prompts you for details, run the command without the `gutenpride` name. diff --git a/packages/create-block-tutorial-template/CHANGELOG.md b/packages/create-block-tutorial-template/CHANGELOG.md index c9f8f3d364c425..b13dc80f799a7b 100644 --- a/packages/create-block-tutorial-template/CHANGELOG.md +++ b/packages/create-block-tutorial-template/CHANGELOG.md @@ -6,6 +6,10 @@ - Bring project's template compatibility with `@wordpress/create-block` v3 ([#39049](https://github.com/WordPress/gutenberg/pull/39049)). +### Enhancement + +- Update project template configuration and templates to synchronize with the updated [Create a Block Tutorial](https://developer.wordpress.org/block-editor/getting-started/create-block/) ([#39049](https://github.com/WordPress/gutenberg/pull/39049)). + ## 1.4.0 (2022-01-27) ### Enhancement diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index 3e074775916ef5..ab68312568f5ab 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -2,12 +2,26 @@ ## Unreleased +### Breaking Changes + +- It is no longer mandatory to provide the deprecated `templatesPath` option when configuring the custom project template ([#39049](https://github.com/WordPress/gutenberg/pull/39049)). +- Custom project templates will use default template files during scaffolding for the WordPress plugin shell and/or individual blocks. It is possible to replace them with a custom set of template files by using the `pluginTemplatesPath` and/or `blockTemplatesPath` options ([#39049](https://github.com/WordPress/gutenberg/pull/39049)). +- The default `esnext` project template got renamed to `static` ([#39049](https://github.com/WordPress/gutenberg/pull/39049)). + +### Deprecations + +- To remove confusion when configuring custom project templates, the `templatesPath` option got renamed to `pluginTemplatesPath`. The old name still works but is considered deprecated, and it might get removed in the future ([#39049](https://github.com/WordPress/gutenberg/pull/39049)). + +### Documentation + +- Include a missing note on how to create a zip file for a WordPress plugin ([#39049](https://github.com/WordPress/gutenberg/pull/39049)) + ## 2.9.0 (2022-02-10) ### New Features -- Automatically add a `"env": "wp-env"` entry to scripts when the `--wp-env` is passed or when a template sets `wpEnv` to `true` ([#38530](https://github.com/WordPress/gutenberg/pull/38530)). -- Introduce the `customScripts` property to allow templates to define additional scripts ([#38535](https://github.com/WordPress/gutenberg/pull/38535)). +- Automatically add a `"env": "wp-env"` entry to scripts when the `--wp-env` is passed or when a template sets `wpEnv` to `true` ([#38530](https://github.com/WordPress/gutenberg/pull/38530)). +- Introduce the `customScripts` property to allow templates to define additional scripts ([#38535](https://github.com/WordPress/gutenberg/pull/38535)). ## 2.8.0 (2022-01-27) diff --git a/packages/create-block/README.md b/packages/create-block/README.md index 933d3daec27547..64105f1bfe3a7d 100644 --- a/packages/create-block/README.md +++ b/packages/create-block/README.md @@ -6,7 +6,7 @@ It is largely inspired by [create-react-app](https://create-react-app.dev/docs/g ## Description -Blocks are the fundamental element of the WordPress block editor. They are the primary way in which plugins and themes can register their functionality and extend the editor's capabilities. +Blocks are the fundamental element of the WordPress block editor. They are the primary way in which plugins can register their functionality and extend the editor's capabilities. Visit the [Gutenberg handbook](https://developer.wordpress.org/block-editor/developers/block-api/block-registration/) to learn more about Block API.