-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add staticModifiers
option
#1021
Add staticModifiers
option
#1021
Conversation
455cc03
to
ee65257
Compare
if (node.path.type !== 'PathExpression') { | ||
return; | ||
} | ||
if (node.path.this === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need same for node.path.data === true
({{@foobar}})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, didn't know about that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added! I also forgot about "contextual" modifiers so I added that as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Windvis could we cover "modifier" helper usage?
like
{{#let (modifier "foo-bar" arg param=1) as |my-modifier|}}
<div {{my-modifier}} ></div>
{{/let}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0f95933
to
f4c41d1
Compare
This option makes it possible to tree-shake unused modifiers and is the modifier equivalent of staticHelpers and staticComponents.
f4c41d1
to
b159f89
Compare
still need to add tests and actually test if it works 😬I added some tests. Let me know if I missed something 🙏.Closes #603