Skip to content

switch hello-world tag to PascalCase #951

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

Merged
merged 1 commit into from
Oct 9, 2017

Conversation

hootlex
Copy link
Contributor

@hootlex hootlex commented Oct 6, 2017

According to the Style Guide component names should always be PascalCase in single-file components and string templates.

@LinusBorg LinusBorg added this to the 1.2.0 milestone Oct 7, 2017
@LinusBorg LinusBorg merged commit 05148da into vuejs-templates:develop Oct 9, 2017
@IamManchanda
Copy link

IamManchanda commented Oct 9, 2017

Sorry but I strongly disagree and oppose this!
HTML is preferred kebab-case by developers/designers worldwide!

How was this merged without any talks?

@IamManchanda
Copy link

Vue automatically converts pascal case HelloWorld to kebab-case hello-world
Then why??

Copy link

@IamManchanda IamManchanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please re-look!

@@ -4,7 +4,7 @@
{{#router}}
<router-view/>
{{else}}
<hello-world/>
<HelloWorld/>
Copy link

@IamManchanda IamManchanda Oct 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of changing this why not tell people that Vue automatically converts

HTML is preferred kebab-case by developers/designers worldwide!

@LinusBorg
Copy link
Contributor

LinusBorg commented Oct 9, 2017

Hi there!

There's no reason to panic, so calm down, take a deep brath and relax.

The change you are seeing is only stylistic in nature. We made this change in this example component because in our recently released Style Guide, we recommend PascalCase for Component tags in templates of Single File Components(!). Read more about it here

But this style is:

  1. just a recommendation
  2. not a technical change, nothing was broken or anything.

You can still do both, and you always could:

<hello-world>this works!!</hello-world>
<HelloWorld>this works, too!!</HelloWorld>
`` 

@hootlex hootlex deleted the patch-1 branch October 9, 2017 14:51
@hootlex
Copy link
Contributor Author

hootlex commented Oct 9, 2017

Thanks for detailed answer @LinusBorg. I also updated the description for future reference.

@IamManchanda
Copy link

I prefer this one because its HTML like!

<!-- Everywhere -->
<my-component></my-component>

and not

<!-- In single-file components and string templates -->
<MyComponent/>

<!-- In DOM templates -->
<my-component></my-component>

That said, The preference is totally personal
so yeah, I am happy and satisfied
... ohk no issue :D

@Toilal
Copy link
Contributor

Toilal commented Oct 14, 2017

It should at least be consistent, there's a <router-view> tag just above in the same file.

@LinusBorg
Copy link
Contributor

LinusBorg commented Oct 14, 2017

Thanks for the hint :)

LinusBorg added a commit that referenced this pull request Oct 16, 2017
* switch hello-world tag to PascalCase (#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (#984)

- vue 2.5
- vue-router 3.0
LinusBorg added a commit that referenced this pull request Oct 16, 2017
* switch hello-world tag to PascalCase (#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (#984)

- vue 2.5
- vue-router 3.0

* fix missing dependency updates for

* vue-template compiler
* vue-loader

* bump version string
LinusBorg pushed a commit that referenced this pull request Nov 12, 2017
)

* refactor: replace karma and mocha with jest

* refactor: remove webpack.test.conf

* refactor: prompt jest instead of mocha and karma

* feat(jest): add coverage reporting

* docs(jest): update unit.md with details of jest

* docs(jest): remove karma files from structure.md

* docs(jest): replace details on Karma with details on Jest

* docs: add missing period

* docs(jest): replace karma with Jest in commands.md

* docs(jest): update npm run unit bullet points

* refactor: use module-resolver in place of jest moduleNameMapper

* refactor: remove .vue extension from Hello import

* test: include src files in test coverage

* test: only ignore router/index in coverage if router option selected

* chore: fix merge conflicts

* chore: add MIT free Jest

* Reference dev script in start script instead of copy pasting (#894)

Less duplication FTW.

* feat: add karma option

* refactor: use const in webpack.test.conf

* add version tag to config/index.js

* stick to ES5

this file is not transpiled

* Bumping Vue+VueRouter versions, some minor fixes. (#986)

* switch hello-world tag to PascalCase (#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (#984)

- vue 2.5
- vue-router 3.0

* Fix missing dependency bumps (#987)

* switch hello-world tag to PascalCase (#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (#984)

- vue 2.5
- vue-router 3.0

* fix missing dependency updates for

* vue-template compiler
* vue-loader

* bump version string

* refactor: use jest module mapping

* feat(jest): filter jest setup file

* fix: fix trailing comma

* docs: add Jest and Karma to unit section

* fix: add Jest options if jest option

* test: change env in .eslintrc

* fix: remove merge trace

* fix: merge package.json with develop

* docs: split unit test docs into Jest and Karma

* docs: add Karma and Jest to README

* docs: reimplement karma files in structure.md
LinusBorg added a commit that referenced this pull request Nov 12, 2017
* Reference dev script in start script instead of copy pasting (#894)

Less duplication FTW.

* add version tag to config/index.js

* stick to ES5

this file is not transpiled

* Bumping Vue+VueRouter versions, some minor fixes. (#986)

* switch hello-world tag to PascalCase (#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (#984)

- vue 2.5
- vue-router 3.0

* Fix missing dependency bumps (#987)

* switch hello-world tag to PascalCase (#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (#984)

- vue 2.5
- vue-router 3.0

* fix missing dependency updates for

* vue-template compiler
* vue-loader

* bump version string

* Fix Unknown plugin istanbul error when no unit test (#785)

* Fix Unknown plugin istanbul error when no unit test

* simplify handlebars conditionals.

* Revert "Fix Unknown plugin istanbul error when no unit test (#785)" (#1035)

This reverts commit 14f2a92.
LinusBorg added a commit that referenced this pull request Nov 13, 2017
* re-merge (#1045)

* Reference dev script in start script instead of copy pasting (#894)

Less duplication FTW.

* add version tag to config/index.js

* stick to ES5

this file is not transpiled

* Bumping Vue+VueRouter versions, some minor fixes. (#986)

* switch hello-world tag to PascalCase (#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (#984)

- vue 2.5
- vue-router 3.0

* Fix missing dependency bumps (#987)

* switch hello-world tag to PascalCase (#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (#984)

- vue 2.5
- vue-router 3.0

* fix missing dependency updates for

* vue-template compiler
* vue-loader

* bump version string

* Fix Unknown plugin istanbul error when no unit test (#785)

* Fix Unknown plugin istanbul error when no unit test

* simplify handlebars conditionals.

* Revert "Fix Unknown plugin istanbul error when no unit test (#785)" (#1035)

This reverts commit 14f2a92.

* Remove unnecessary whitespaces (#1047)

* fix(jest): fix Jest coverage directory (#1046)

Explicitly set the coverage directory to match Karma and .gitignore

* Fix typos and formatting (#1048)

* re-add postcss-loader

was mistakenly removed during merge of #824

* bumb version string in config

* bumb version string in config in package.json
shenron pushed a commit to shenron/webpack that referenced this pull request Mar 20, 2018
…uejs-templates#824)

* refactor: replace karma and mocha with jest

* refactor: remove webpack.test.conf

* refactor: prompt jest instead of mocha and karma

* feat(jest): add coverage reporting

* docs(jest): update unit.md with details of jest

* docs(jest): remove karma files from structure.md

* docs(jest): replace details on Karma with details on Jest

* docs: add missing period

* docs(jest): replace karma with Jest in commands.md

* docs(jest): update npm run unit bullet points

* refactor: use module-resolver in place of jest moduleNameMapper

* refactor: remove .vue extension from Hello import

* test: include src files in test coverage

* test: only ignore router/index in coverage if router option selected

* chore: fix merge conflicts

* chore: add MIT free Jest

* Reference dev script in start script instead of copy pasting (vuejs-templates#894)

Less duplication FTW.

* feat: add karma option

* refactor: use const in webpack.test.conf

* add version tag to config/index.js

* stick to ES5

this file is not transpiled

* Bumping Vue+VueRouter versions, some minor fixes. (vuejs-templates#986)

* switch hello-world tag to PascalCase (vuejs-templates#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (vuejs-templates#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (vuejs-templates#984)

- vue 2.5
- vue-router 3.0

* Fix missing dependency bumps (vuejs-templates#987)

* switch hello-world tag to PascalCase (vuejs-templates#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (vuejs-templates#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (vuejs-templates#984)

- vue 2.5
- vue-router 3.0

* fix missing dependency updates for

* vue-template compiler
* vue-loader

* bump version string

* refactor: use jest module mapping

* feat(jest): filter jest setup file

* fix: fix trailing comma

* docs: add Jest and Karma to unit section

* fix: add Jest options if jest option

* test: change env in .eslintrc

* fix: remove merge trace

* fix: merge package.json with develop

* docs: split unit test docs into Jest and Karma

* docs: add Karma and Jest to README

* docs: reimplement karma files in structure.md
shenron pushed a commit to shenron/webpack that referenced this pull request Mar 20, 2018
* Reference dev script in start script instead of copy pasting (vuejs-templates#894)

Less duplication FTW.

* add version tag to config/index.js

* stick to ES5

this file is not transpiled

* Bumping Vue+VueRouter versions, some minor fixes. (vuejs-templates#986)

* switch hello-world tag to PascalCase (vuejs-templates#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (vuejs-templates#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (vuejs-templates#984)

- vue 2.5
- vue-router 3.0

* Fix missing dependency bumps (vuejs-templates#987)

* switch hello-world tag to PascalCase (vuejs-templates#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (vuejs-templates#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (vuejs-templates#984)

- vue 2.5
- vue-router 3.0

* fix missing dependency updates for

* vue-template compiler
* vue-loader

* bump version string

* Fix Unknown plugin istanbul error when no unit test (vuejs-templates#785)

* Fix Unknown plugin istanbul error when no unit test

* simplify handlebars conditionals.

* Revert "Fix Unknown plugin istanbul error when no unit test (vuejs-templates#785)" (vuejs-templates#1035)

This reverts commit 14f2a92.
shenron pushed a commit to shenron/webpack that referenced this pull request Mar 20, 2018
* re-merge (vuejs-templates#1045)

* Reference dev script in start script instead of copy pasting (vuejs-templates#894)

Less duplication FTW.

* add version tag to config/index.js

* stick to ES5

this file is not transpiled

* Bumping Vue+VueRouter versions, some minor fixes. (vuejs-templates#986)

* switch hello-world tag to PascalCase (vuejs-templates#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (vuejs-templates#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (vuejs-templates#984)

- vue 2.5
- vue-router 3.0

* Fix missing dependency bumps (vuejs-templates#987)

* switch hello-world tag to PascalCase (vuejs-templates#951)

* fix Es6 code issue.

This file is not transpiled, so we should stick to ES5

* Fix bug in dev-server when a proxyTable entry is a string (vuejs-templates#965)

`options` can not be a `const` because it is modified if value is a string.

* Fix casing

* Revert 9befbfc

* update to vue and vue-router latest version (vuejs-templates#984)

- vue 2.5
- vue-router 3.0

* fix missing dependency updates for

* vue-template compiler
* vue-loader

* bump version string

* Fix Unknown plugin istanbul error when no unit test (vuejs-templates#785)

* Fix Unknown plugin istanbul error when no unit test

* simplify handlebars conditionals.

* Revert "Fix Unknown plugin istanbul error when no unit test (vuejs-templates#785)" (vuejs-templates#1035)

This reverts commit 14f2a92.

* Remove unnecessary whitespaces (vuejs-templates#1047)

* fix(jest): fix Jest coverage directory (vuejs-templates#1046)

Explicitly set the coverage directory to match Karma and .gitignore

* Fix typos and formatting (vuejs-templates#1048)

* re-add postcss-loader

was mistakenly removed during merge of vuejs-templates#824

* bumb version string in config

* bumb version string in config in package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants