View component folder and filename structure
stared opened this issue · comments
The current structure is of folders and files is chaotic.
I ask to change the structure, so it is more ordered. (While, please resisting a temptation to refactor or fix any other parts of the code, beyond paths for import lines).
For elements only used within an Encyclopedia
, adapt convention EncyclopediaSection
, EncyclopediaSectionBoard
etc.
The folder structure is up to you (though, please post to a blog post with this best practice; I saw a few).
There are various converions. Right now the one we use is closest to: https://itnext.io/how-to-structure-a-vue-js-project-29e4ddc1aeeb
In thic case, it is essential to:
- put all components (except for layours) in
components
foldes - name things accordingly, e.e.
Info
andInfoSection
,InfoTransition
(and certainly no abbreviations like QCell)
So first, read default Vue.js recommendation: https://vuejs.org/v2/style-guide/#Priority-B-Rules-Strongly-Recommended-Improving-Readability
See also:
- https://hackernoon.com/learn-to-manage-large-vue-js-components-in-4-min-64fc2b9b2ef9 - overview of various options (the first one is the most common, but we can adapt another if needed)
- https://dev.to/maxpou/3-tips-for-scaling-large-vuejs-application-2edi
- https://medium.com/@vuefront/finding-the-perfect-component-file-structure-for-out-vuejs-app-b808a69dacac
Closed as PR #50 accepted