I
I
Igorek982021-06-19 01:33:04
Software design
Igorek98, 2021-06-19 01:33:04

How to properly separate files and folders in a project?

Tell me how to separate folders and files?
For example, there is a page called - add, filter, edit.
In the first we add articles.
In the second, we store filters for articles.
In the third, we can edit articles.
But we can also edit the filters themselves.

How to properly separate files into folders?
For example, I have all js files in the same folder, but they are different and apply to all pages from above.
So are css, and the page folder in which the html of these pages are located.

Is it supposed to be like this or is there a better way to store them?
The pages themselves are also divided into components, which are also stored in a separate component folder and are also all mixed with different pages, differing only in name.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2021-06-19
@Igorek98

https://habr.com/ru/post/561240/

A
Aetae, 2021-06-19
@Aetae

Huh, this is a moot point. I use the same hierarchical structure. Those. at the top level, I have folders components, utils, etc., then each complex component / page has its own folder with exactly the same structure related specifically to this component. And so deep. If something becomes common, it goes higher, something local - lower. But I do not pretend to be the truth, and some may find it terrible.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question