1

I want to create my own template system for node.js (just for educational purposes), but I can't find any useful information to start with. Are there any good tutorials out there which could help me? Thanks!

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
nicowernli
  • 3,250
  • 22
  • 37
  • node itself doesn't impose any requirements on template systems. Some of the common frameworks built on it (e.g. Express) do have specific protocols for how a template processor can communicate with the framework. You might take a look at widely-used template systems and see how they do it. Offhand, I'm not convinced that re-inventing the wheel is the best way to learn something, but if you want to, I'll make a selfish suggestion (which will be a very tall order): Try to implement DTL (Django Template Language) in a way that doesn't require Dojo. – ebohlman Jun 09 '12 at 07:31

1 Answers1

1

Jison docs would be a good place to start. A breakdown of how it's used to build a parser for the CoffeeScript grammar may be helpful in seeing the big picture.

References

Community
  • 1
  • 1
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265