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

WordPress Trac noreply at wordpress.org
Tue Jan 21 14:54:42 UTC 2020


#49196: Copy block metadata files for dynamic blocks
------------------------------+-------------------------
 Reporter:  chipsnyder        |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  5.4
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:  javascript
------------------------------+-------------------------

Comment (by chipsnyder):

 @gziolo I like the approach here better. I think it makes the references
 more clear by moving the blocks to their respective folders.

 If we go with this approach, we'll need to make a few changes back in
 Gutenberg as well.

 1) Update the copy of the PHP files to be in nested folders
 https://github.com/WordPress/gutenberg/blob/master/webpack.config.js#L120-L122

 2) Update the copy of the JSON files to be in nested folders
 https://github.com/WordPress/gutenberg/blob/master/webpack.config.js#L155-L157
 (Or consolidate with step 1)

 3) Update the JSON reference in shortcode
 https://github.com/WordPress/gutenberg/blob/master/packages/block-
 library/src/shortcode/index.php#L24

 4) Update the references to the PHP files. This is the step I wasn't sure
 about before and what had me hesitant about taking in on as part of the
 shortcode PR. I think that this is the only place we would need to make
 that update though
 https://github.com/WordPress/gutenberg/blob/eeb13f45a4f890179cfc9b0203f4019eb4d19f41/lib/blocks.php#L41-L62

 5) Update the build script for zipping plugins
 https://github.com/WordPress/gutenberg/blob/master/bin/build-plugin-
 zip.sh#L112

 These are probably pretty straight forward changes now that I'm learning
 more about how the project organized. There might be another step in there
 that I'm not aware of yet. I'm happy to work with you to get those done.

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


More information about the wp-trac mailing list