WebDevStudios / wds-block-starter

A block starter for projects.
15 stars 3 forks source link

Leverage @wordpress/scripts #36

Closed gregrickaby closed 4 years ago

gregrickaby commented 4 years ago

With @wordpress/scripts 12+ there's no need to provide our own config(s) for compiling Sass & CSS. This PR strips out some bloat, updates composer stuffs, and adds block.json, which is used for registering with the block directory.

Tested locally and the RichText block renders and works as expected.

gregrickaby commented 4 years ago

@michealengland Per our Slack convo, you're going to push up a slimmer Webpack config and updated Readme.

michealengland commented 4 years ago

@gregrickaby I added some minor updates based on our discussion from earlier. Also, I'm checking out the errors on buddy. Something appears to be going on with Buddy and I'm not sure sure what the cause is. The errors it is flagging are not present in this plugin. If you want we can get together on this in the morning.

Update notes:

  1. I re-added back the webpack config with only the bare necessities.
  2. Added a doc block to the webpack config and additonal details to the README doc.
  3. I did not include the CleanWebpackPlugin as it looks like WP is implementing their own version of that feature. However, I did include ignore-emit-webpack-plugin to prevent the unnecessary dependency file from being generated.
gregrickaby commented 4 years ago

@michealengland I fixed Buddy. 👍🏻

I also updated docblocks, comments, and a few other things. Please take a look.