[wp-trac] [WordPress Trac] #49196: Copy block metadata files for dynamic blocks

WordPress Trac noreply at wordpress.org
Tue Jan 14 14:45:08 UTC 2020


#49196: Copy block metadata files for dynamic blocks
------------------------------+-----------------------------
 Reporter:  chipsnyder        |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:  has-patch
  Focuses:                    |
------------------------------+-----------------------------
 For dynamic blocks, there are several blocks whose metadata needs to be
 loaded in PHP. The attributes that are loaded via PHP are not exposed to
 the ReactNative components when Gutenberg loads the index.js files in the
 Mobile Apps. To support one master set of metadata that can be used to
 register in the PHP files and the Javascript files; I'd like to copy over
 the block.json files with their corresponding PHP files.

 This would be a modification here:
 https://github.com/WordPress/wordpress-
 develop/blob/14376be6e195ce9cc7f4bf237651504777b504fb/tools/webpack/packages.js#L97-L109

 Suggested change dynamically lookup and block.json files that exist in the
 paths registered under `phpfiles`. If the path has a defined block.json
 file then copy it to `wp-includes/blocks/` and rename it to `{block-
 name}.json`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49196>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list