WebDevStudios / wd_f

GNU General Public License v2.0
11 stars 1 forks source link

Create a block specific build pattern so scss and css can be local to the block folder. #38

Closed schlotterer closed 1 year ago

schlotterer commented 1 year ago

Create a blocks specific build process that creates and registers the css in the block folder. This allows for more efficient rendering of the css and again contributes to block portability.

khleomix commented 1 year ago

This was done before but we have to remove that so that Tailwind will work with only just one config file. All custom block styles will be added under the src/scss/blocks/custom folder. We can probably add that as part of the WPClI command. I'm pulling in @guzmandrade-wds here to see if this is something that we can do.

guzmandrade-wds commented 1 year ago

@khleomix https://github.com/WebDevStudios/wd_f/pull/44 adds to the WP-CLI command some changes, so block style files src/scss/blocks/custom/<block_name>.scss and src/scss/blocks/custom/<block_name>.editor.scss are used in the build/watch processes. Since the styles are added as file:* in block.json we don't need to enqueue them as with critical.css.

khleomix commented 1 year ago

Thanks @guzmandrade-wds. Closing this out as done.