Closed nippur72 closed 7 years ago
cherry picked
@idok can you please comment about the remaining features in my PR? will they be merged or can I consider them rejected? do you want me to isolate them so that they have no merge conflicts?
@nippur72 first I want to apologise for the delay in reviewing your work. If I am not mistaken I have cherry picked all of your changes besides lodash helpers and create element alias which are still in review. Regarding create element alias, it can potentially introduce a naming conflict which will be difficult to make sense of.
@idok thanks. Regarding createElement
, the rationale is saving bytes (e.g. h()
) and being able to use other engines like preact
. There's something similar in babel
and now also in TypeScript
(flag --jsxFactory
) so I think it makes sense to have that in our templates too.
Currently the syntax parsing for
rt-scope
is quite weak not allowing templates like the following:The problem lies in expressions containing
" as "
and";"
because those are also delimiters used to scan tokens in thert-scope
attribute.I think that can be slightly improved by having a proper regex that looks for the substring
" as id;"
whereid
is a valid JavaScript identifier and;
is optional.Hopefully that should lower the risk of keyword clashing.