From ec29c70656cde561b8b576062113b867007b8128 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Fri, 15 Oct 2021 10:08:24 -0400 Subject: [PATCH 1/4] Update changelog to reflect changes in #35645. --- packages/create-block/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index 87eb7d387faa31..c2863ed663ff38 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased ### New Features +- Add using passing local directories to --template. ([#35645](https://github.com/WordPress/gutenberg/pull/35645)) - Add `slugPascalCase` to the list of variables that can be used in templates ([#35462](https://github.com/WordPress/gutenberg/pull/35462)) ## 2.5.0 (2021-07-21) From 9679479f516b0c5b1a735c612dae09e9ff3175a1 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Fri, 15 Oct 2021 10:15:31 -0400 Subject: [PATCH 2/4] Remove unneeded word. --- packages/create-block/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index c2863ed663ff38..cf4e78916eded7 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -3,7 +3,7 @@ ## Unreleased ### New Features -- Add using passing local directories to --template. ([#35645](https://github.com/WordPress/gutenberg/pull/35645)) +- Add passing local directories to --template. ([#35645](https://github.com/WordPress/gutenberg/pull/35645)) - Add `slugPascalCase` to the list of variables that can be used in templates ([#35462](https://github.com/WordPress/gutenberg/pull/35462)) ## 2.5.0 (2021-07-21) From 2815c6e750536498e4b384a66ebf8c6f316cfbf9 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Fri, 15 Oct 2021 10:18:13 -0400 Subject: [PATCH 3/4] Update readme to inlcude local template references and example. --- packages/create-block/README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/create-block/README.md b/packages/create-block/README.md index 12dd8f2567d1fc..2ae2ad98590d13 100644 --- a/packages/create-block/README.md +++ b/packages/create-block/README.md @@ -40,7 +40,7 @@ Options: ```bash -V, --version output the version number --t, --template block template type name, allowed values: "es5", "esnext", or the name of an external npm package (default: "esnext") +-t, --template block template type name, allowed values: "es5", "esnext", the name of an external npm package (default: "esnext"), or the path to a local directory. --namespace internal namespace for the block name --title display title for the block --short-description short description for the block @@ -65,7 +65,13 @@ $ npx @wordpress/create-block $ npx @wordpress/create-block --template es5 ``` -3. Help – you need to use `npx` to output usage information. +3. Local template directory – it is also possible to pick a local directory as a template. + +```bash +$ npx @wordpress/create-block --template ./path/to/template +``` + +4. Help – you need to use `npx` to output usage information. ```bash $ npx @wordpress/create-block --help From d47d7e9bc791bdcc728613bd235410c6bf1e9aa3 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Fri, 15 Oct 2021 11:44:19 -0400 Subject: [PATCH 4/4] Fix indentation. --- packages/create-block/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index cf4e78916eded7..a8d54848ad791b 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -4,7 +4,7 @@ ### New Features - Add passing local directories to --template. ([#35645](https://github.com/WordPress/gutenberg/pull/35645)) -- Add `slugPascalCase` to the list of variables that can be used in templates ([#35462](https://github.com/WordPress/gutenberg/pull/35462)) +- Add `slugPascalCase` to the list of variables that can be used in templates ([#35462](https://github.com/WordPress/gutenberg/pull/35462)) ## 2.5.0 (2021-07-21)