WordPress / community-themes

A collection of Block Themes built by the WordPress community.
80 stars 33 forks source link

Add a theme utils script #20

Closed scruffian closed 1 year ago

scruffian commented 1 year ago

This adds a new theme utils script which can be used to escape patterns and translate their content.

This can be run with this command: npm run patterns:escape

To test:

  1. Check out this branch and run npm i to install the dependencies
  2. Check out the Stacks theme: https://github.com/WordPress/community-themes/pull/13
  3. Make a change to the pattern file
  4. Run npm run patterns:escape
  5. Check that the patterns have been escaped.