B
B
BonBon Slick2020-01-18 10:23:38
Hierarchical structures
BonBon Slick, 2020-01-18 10:23:38

What is the best project structure?

pages
  / public
      / user
         / mixins
     / post
         / mixins
  / secured
     / user
         / mixins
     / post 
         / mixins

//or

pages
  / public
      / user
     / post
  / secured
     / user
     / post
mixins
 / public
   / user 
   / pages 

// or

pages
      / user
        / public
           / mixins
        / secured
           / mixins
     / post
        / public
           / mixins
        / secured
           / mixins


The question arose because I already encountered such nesting
vue priject
  / src
    / components 
       / pages
           / public
              / user
                  / partials
                      / modal 
                           / registration_modals
                                 / modal_1
                                        / partials
                                        / mixin

Here, in the last modal_1 folder add .js + .scss + .html files of each partials and the modal window itself, 12+ files come out in total in the modal_1 folder, excluding the partials... folders.
A similar situation is beginning to appear in some places on the back-end.
All of course cool, on the shelves, I would like to know how others.
File search exclusively by quick search, no manual through folder view.

I think it would be possible to throw a couple more options, I'm wondering how to correctly spread the folder structure in Vue in hexagon. Basic documentation is too simple, larger projects are not suitable.
Because there is still a lot of everything, tests, directives, utils, interfaces, store with a huge bunch of modules and much more.
I tried to find real projects, I didn't find anything good. Just demos and stuff.

How do you break the Vue structure into modules?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-01-18
@BonBonSlick

Really, do whatever you feel comfortable with. Vue allows you to customize your project however you want.
If you need examples - just open the source of any "large" project - https://github.com/PanJiaChen/vue-element-admin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question