This WordPress plugin is commonly used to do freelancers to avoid that the clients mess with the code added even if they update/change the theme.
This plugin uses the follow tools.
- Gulp - Builder/Task Manager
- Twig - Template engine
- Babel - To build WP Blocks
- PostCSS - To build the CSS
You will need to have installed the NodeJS & the Composer php With these tools installed on the root directory of the plugin you will need to run the follow commands:
npm install
or yarn
composer update
The plugin contain the following tasks on gulp
gulp blocks
- To build all JS & CSS of blocksgulp admin
- To build all JS & CSS inside the foldersrc/admin
gulp public
- To build all JS & CSS inside the foldersrc/public
gulp
- Will run all tasks mentioned above
The plugin is ready to work with ACF Block and the native WordPress/Gutenberg blocks
The folder blocks
has and example of how an ACF Block will work.
Inspired by the native blocks of WordPress the plugin also uses the file block.json
to define some blocks attributes.
Blocks on the plugin is module based, in other words, all files from the block will be in the same folder.
To load your block you will need to add your block namespace into the array on the file loadBlocks.php
. The name space must follow the structure of FolderName/ClassName
Feel free to open any PR or open any requests