What is bad such a structure?

Red square - class ( template ), inside it has (for example): bootstrap, jquery, webpack, gulp
Stars are separate projects ( sites ).
We use one template for all sites.

Suppose we needed a footer from a blue site, we dragged it to yellow and predetermined how we needed it. From the yellow, we needed another block for green, we took it. Next comes the update of the template and we load the dependencies for all our projects and quietly use new technologies in old projects.

enter image description here

  • Where are the boundaries of the repository, how many? Have you crammed four sites into one repository? The lines from the class / template to the websites what logical connection is displayed, what does it mean? Perhaps you understand the structure, but have described it very incomprehensible in order to be understood from the side. - AK ♦
  • 2
    In general, the described is more like a repository of typical snippets for the site. Opened the repository, copied to the current project, closed. - AK ♦
  • git submodules? - Duck Learns to Take Cover
  • Yes, exactly 4 sites in one repository may be more. Lines from Template means that we use it, we first copied the template 4 times, after a while we pulled an update from all the template (sites) from the template - HelpaMnePlz

1 answer 1

In this way of using, I see 2 unpleasant moments:

  1. Complicated structure. You will have 5 branches corresponding to the usual master. You need to keep in mind that, for example, the task_123 branch should be in the site1_master, and the task_234 branch in the framework_master. Moreover, with cross-merge history quickly becomes unreadable.

  2. If you have a lot of frequently changing images (or any other binaries), then there may be performance problems.

  • 1. You can use more understandable name Suppose site1_task123 and immediately understand what it refers to - HelpaMnePlz
  • Yes, you can, but you need to keep in mind that this is the way to do it. I don’t mean that you can’t do that, but simply designate pitfalls, but whether they are critical for you personally or not, decide for yourself. - German Borisov