Allow camelCase for proxy to reflect dashes in tag name
See original GitHub issueProxy mechanism is very convenient but I did not find a way to create tags with a dash, e.g. <my-table></my-table>
. It would be convenient to use camelCase (as seen in css-loader) to proxy crel using crelProxy.myTable()
over crelProxy['my-table']
.
I could make a PR but somehow my editor (atom/vscode) changes white spaces and the whole file is marked as a change: https://github.com/quirm/crel/commit/acb0c89b5660498d8b0f330331be47890dcab94d (a change https://github.com/quirm/crel/blob/master/crel.js#L159-L164)
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
How to convert hyphen-delimited tag names to camel case
I want to remove hyphens ( - ) and uppercase the single alpha character following each removed hyphen. I.e. convert from hyphen-delimited words ......
Read more >Change watchers do not work for hyphenated attribute names ...
hyphenated attribute names should map to camelCase property names (was: Change watchers do not work for hyphenated attribute names) #150.
Read more >Should tags use dashes, camel case or underscores? Should ...
Is There a Standard for Tag Names? ... I can go either way with dashes or CamelCase, but all lowercase is only slightly...
Read more >What is the CamelCase naming convention? - TechTarget
CamelCase is a way to separate the words in a phrase by making the first letter of each word capitalized and not using...
Read more >New Poll: Hyphens, Underscores, or camelCase? - CSS-Tricks
I use CamelCase for class names, camelCase for function and variable names, and underscores for CSS and database stuff. Michael O'Loughlin.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI I have no idea if the
import * as crel from '^/crel'
syntax will work since it’s a horrible syntax that adds no clarity and in fact generally obscures how the module system works. YMMV.Sorry this didn’t end up being very helpful for you.
I think I’ll still end up using this change, as it also removes setup that currently happens in crel regardless of whether you use .proxy or not.
I’d personally recommend you try the symlink approach, i generally use it to symlink the root of a project to
^
, to avoid annoying paths like../../../myModule
, and instead do^/myModule