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

Template tag codemod namehint #2134

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

void-mAlex
Copy link
Collaborator

builds upon the codemod ts branch to add optional naming hint different than babel-import-util transforms for us by default in the internal build of embroider
by default this will capitalise all words and concat any hyphens folder separators are replaced with _ to make it a valid js identifier

for now this would transform the known case of div helper to an import named Div and used as is in a strict mode template
initial testing suggests this works fine
{{Div}}

would love feedback if this is an acceptable approach to achieving this feature for the codemod

still passed as a hint to avoid naming collisions
`Shared::ConfirmButton` becomes `Shared_ConfirmButton`
@void-mAlex void-mAlex requested a review from ef4 October 1, 2024 22:38
@ef4 ef4 merged commit 8850c96 into bugfix-template-tag-codemod-ts Oct 8, 2024
@ef4 ef4 deleted the template-tag-codemod-namehint branch October 8, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants