It is possible to set global defaults for all blocks registered with Blockstudio using the blockstudio/defaults filter:
The code above will limit all BS blocks to posts. Setting the post type on individual blocks will override the global setting.
It may make sense to prefix all blocks if you already have an existing blocks library in either framework. The blockstudio/prefix filter does exactly that:
The code above would convert the block name from acf/my-block to acf/bs-my-block.
Changing the location of the folder that is going to be searched for blocks might be necessary, for example if you are using a page builder like Oxygen, which disables the theme altogether. Use the blockstudio/path filter to do so:
Check out the minimal starter plugin on GitHub, to see how to register blocks from a plugin.
If the above options are not enough, it is possible to initiate the Blockstudio\Build class on various folders of your choice:
Using different prefixes is highly advisable in this case, as it'll make sure that no two block names will be the same.
Sometimes it makes sense to exclude certain folders from Blockstudio. For example, you could have a place to store all components which are used throughout your blocks.
The code above will exclude all files inside folders named components.
When using assets , Blockstudio automatically enqueues a CSS file named style.css and a JS file named script.js with your block if they are available. Both file names can be changed using following filters:
Please note that this filter also applies to the inline file name.