[wp-meta] [Making WordPress.org] #5207: Improve heuristics for detecting block assets
Making WordPress.org
noreply at wordpress.org
Mon Aug 3 17:40:03 UTC 2020
#5207: Improve heuristics for detecting block assets
------------------------------+---------------------------
Reporter: tellyworth | Owner: coreymckrill
Type: enhancement | Status: assigned
Priority: high | Milestone:
Component: Plugin Directory | Resolution:
Keywords: needs-patch |
------------------------------+---------------------------
Comment (by ryelle):
In `get_detailed_help`, you don't need to do the block data check, since
this is only output on error & warning issues. It should never get here if
data > 0. If you want to leave the check in, it should return a string to
display, or false.
Finding extra files shouldn't be a problem right now, but I'm also seeing
it ''not'' find some valid files. Testing with a
[https://github.com/ryelle/rmb-recipe-block/tree/try/block-json recipe
block I wrote,] it fails to find my CSS file, and instead finds an extra
JS file:
{{{
Found 0 CSS assets.
Found 2 JS assets.
Found file assets/js/blocks/recipe-directions/index.js.
Found file /build/recipe-block.js.
}}}
vs before the patch, it pulls from block.json correctly:
{{{
Found file /build/recipe-block.js.
Found file /build/recipe-block.css.
}}}
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/5207#comment:15>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list