diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index c722750129c84..87eb7d387faa3 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +### New Features +- 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) ### Enhancements diff --git a/packages/create-block/lib/scaffold.js b/packages/create-block/lib/scaffold.js index f761b63aa2351..5255139576733 100644 --- a/packages/create-block/lib/scaffold.js +++ b/packages/create-block/lib/scaffold.js @@ -2,7 +2,7 @@ * External dependencies */ const { writeFile } = require( 'fs' ).promises; -const { snakeCase } = require( 'lodash' ); +const { snakeCase, camelCase, upperFirst } = require( 'lodash' ); const makeDir = require( 'make-dir' ); const { render } = require( 'mustache' ); const { dirname, join } = require( 'path' ); @@ -53,6 +53,7 @@ module.exports = async ( namespaceSnakeCase: snakeCase( namespace ), slug, slugSnakeCase: snakeCase( slug ), + slugPascalCase: upperFirst( camelCase( slug ) ), title, description, dashicon,