vue-enterprise-boilerplate icon indicating copy to clipboard operation
vue-enterprise-boilerplate copied to clipboard

[Question] Naming conventions

Open timlkelly opened this issue 4 years ago • 2 comments

I am curious about the naming conventions used in this boilerplate setup compared to what is generated by the Vue CLI. I realize a lot of this is a personal preference, but I would like to hear why these choices were made.

Regarding Vuex, this project uses state/store.js vs store/index.js.

This project uses kebab-case over PascalCase for component names.

Lastly, I see that there are components prefixed with an underscore. In other frameworks I have used, this indicates that the file is a partial. However, here they look to be full stand-alone components.

timlkelly avatar Jul 01 '20 23:07 timlkelly

There is some explanations in Vue Style Guide which I think was written by him.

Those underscore components are automatically imported in all files, which you don't have to worry about importing them manually, but good question thought.

marceloavf avatar Jul 25 '20 12:07 marceloavf

Those underscore components are automatically imported in all files, which you don't have to worry about importing them manually, but good question thought.

which part does it imports automatically? From what I see, inside routes.js, it is still importing _404.vue manually: component: require('@views/_404.vue').default

Also, a very newbie question - if this project is following kebab-case naming

Do you then name your vue files inside view folder: forgot-password.vue instead of ForgotPassword.vue? Does it apply to route.name property too? I recall that it is better to use PascalCase due to editor autocompletion?

Thanks in advance.

axdyng avatar Aug 20 '20 13:08 axdyng