Slides from WordCamp Philadelphia 2019
Collection of WordPress Gutenberg items pulled from the Handbook and assembled in a plugin using wp-scripts
to compile. There are examples of blocks using ES5 and ES6.
-
From the plugins directory of a local WordPress install
-
Run
git clone https://github.com/pbrocks/wcphl19-collection.git
-
cd wcphl19-collection
-
npm install
-
npm run dev
As mentioned in the talk, CSS is not compiled by wp-scripts yet, but a workaround was suggested by Jeffrey Carandang in his post How to Create Gutenberg Block Plugin using wp-scripts with PostCSS Build Process. I've incorporated his suggestions in the postcss
branch to illustrate how it can work.