My project had a little desire, and I think Meteor can do it, but I am not quite sure on how to do it.
Here’s the thing:
Consider I created a template named "headerMeta"
In this “headerMeta”, I have used some double braced template tags which aren’t defined yet.
I want to get the list of these tags using some function. Any idea how can I do this ?
What you’re looking for is the Spacebars compiler that Meteor itself uses to parse templates. I’m not sure how much documentation there is about how to use it, but that’s one way to solve this properly.
Another way would be to parse the template files manually and just look for simple regular expressions, like… /\{\{\s*(\w+)\s*\}\}/ which would match your expressions with Name and Tagline there, but not if the expression contained dots or slashes or additional parameters to the helper (like {{ getName this }}), which are all also valid spacebars helper expressions. You could enhance the regex a bit so it would match most of those, without having to dig into the spacebars compiler.
(Edit: And it would also not match block helpers and their closing tags {{# and {{/, and template inclusions {{>, but I understood that you’re not interested in those.)