Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Naming conventions #207

Open
timlkelly opened this issue Jul 1, 2020 · 2 comments
Open

[Question] Naming conventions #207

timlkelly opened this issue Jul 1, 2020 · 2 comments
Labels
question Further information is requested

Comments

@timlkelly
Copy link

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.

@marceloavf
Copy link

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.

@axdyng
Copy link

axdyng commented Aug 20, 2020

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.

@bencodezen bencodezen added the question Further information is requested label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants