Closed bcardarella closed 7 months ago
@NduatiK I'm thinking we can drop the helpers from: https://github.com/liveview-native/live_view_native_stylesheet/blob/main/lib/live_view_native/stylesheet/rules_parser/helpers.ex#L9-L16
as well as the additional_helpers
option, but want to get your thoughts.
On the rules parser side we'll still need attr
and event
. I'd also like to look at using @foo-bar
for the attr shorthand. I'd like to find one for events too
Introduces EEx interpolation on the rules document prior to passing to the format specific parser. This means there is a two-phase process.
The tests were also simplified. As
~RULES
is now simply only responsible for interpolating with EEx then passing the resulting document to the format specific rules parser. We didn't need the rules tests in this lilb.This means we can drop the idea of "helpers" as we can execute Elixir code in the EEx interpolation:
and because it's just Elixir we can extract these into function helpers in the sheet itself: