htmlburger / wpemerge-theme

An organized, ES6 and SASS powered theme taking advantage of the WP Emerge framework. 🚀
https://wpemerge.com/
GNU General Public License v2.0
286 stars 33 forks source link

setup project divided into 2 plugins and a theme #66

Closed thunderjet12 closed 3 years ago

thunderjet12 commented 3 years ago

Version

Please add the exact versions used for each of the following:

Expected behavior

my project is divided into 2 plugins and a theme 1 plugin will be the admin plugin so I will need all stuff in the Starter plugin for the internal WordPress admin. my second plugin is Gutenberg blocks, most of the blocks will be dynamic ( not ACF blocks ) but I want to use wp emerge-twig for my dynamic blocks. And lastly, a Theme that will use your twig package also for general templates and will properly use all other things. that come with the Starter theme. " By the way, I use a regular composer setup in bedrock with trellis"

so the question: how can I set up all the Three should any of them have its own setup.?

Please describe the expected behavior here.

Actual behavior

Please describe the actual, unexpected behavior here.

Steps to reproduce (in case of a bug)

1. 1. 1.

Comments

Please add any other comments here. thanks and best regards

atanas-dev commented 3 years ago

Hi @thunderjet12,

You can make it so each of them has their own WP Emerge instance, yes. Bedrock can be a bit tricky since you will have to manually create the plugins once you have require-ed the theme (so WP Emerge's dependencies are present and managed) as you can't have the same dependency twice (theme, plugin A and plugin B).

Should they be separate instances? Now this question I can't answer as it strictly depends on your specific goals and needs. If the plugins and theme are not meant to be distributed I think you'll save yourself some headaches if you combine them or have a "main" one which then provides actions/filters for the others to add their functionality.

thunderjet12 commented 3 years ago

well after multi tries, i get the 3 working thanks for help . as for my project yes it's for production purpose want to release it for theme marketplaces (e.g. theme forest)