humanmade / humanmade/asset-loader

Please provide Gutenberg-ready example in docs

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
PHP
Stars
26
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Hi @kadamwhite

I've been using asset-loader on the last few projects I've worked on, and alongside the webpack helpers package, really enjoy the developer experience when it all works, so kudos to you for putting that together.

An area where I consistently struggle with, and waste a surprising amount of time on, is the new project initial set-up, where I might set up all the build tools etc so it's ready to go for the rest of my dev teams.

It'd be really valuable if, at least, there were docs that explained how to make the most of asset-loader for a typical plugin that adds a Gutenberg block(s). I'm sure you'd agree there's some community best practise for the file layout of a Gutenberg block, such as potentially different CSS for the front-end vs the Gutenberg editor, and I always struggle getting that kind of structure to work with asset-loader.

I think some sample code that I could copy/paste in to a project as a starting point would shave down dramatically some of the time.

I get there in the end, but I'd estimate it takes me 1 to 1.5 days to get asset-loader set-up on a new project (for blocks, and for eslint etc), and I'd love to see that come down. Much of the time is spent debugging the PHP and understanding why it's not working.
(For example, I know the second parameter of `autoregister()` etc needs to match the "entry" object name in the Webpack config, but I seem to have to re-discover that myself for each new project.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.