[WORK-IN-PROGRESS] Stricly, WIP at the moment. Do NOT use it or announce, share it anywhere until I remove this notice and release it to the public.
This is a basic custom Gutenberg block. Files explained below.
block.js
— We register Custom Gutenberg block here.block.build.js
— Built file from block.js
via NPM Script and Webpack.editor.css
_ Block CSS for the editor.style.css
— Block CSS for the front end.index.php
— Enqueue block's assets for the editor and the front end..babelrc
— Babel custom configuration..gitignore
— Git ignore file to ignore node_modules and such other files.package.json
& package-lock.json
— NPM related file for holding NPM related metadata and build
/dev
NPM scripts.webpack.config.js
— Webpack configuration file.Read the files explained above. All of the files are heavily inline documented. All you have to do is following:
node -v
or npm -v
to check their versions.cd /path/to/gutenberg-boilerplate/block/02-basic-esnext/
node install
or sudo node install
block.js
file into block.build.js
you can use run npm scripts.npm run dev
npm run build