Search code examples
javascripttemplatescoffeescripteco

Eco templates: Combine multiple templates from the command-line?


I'm trying use eco for client-side templating. I have multiple .eco templates that I'd like to combine into one js file - I know I can just combine the js files after they are generated but that's a lot of repeated boilerplate. Is there a better way to do this?


Solution

  • Look into stitch by Sam Stephenson (author of eco). It bundles your javascript, coffeescript and eco templates into a single file, and gives you a simple require on the client side. It compiles your eco templates to functions, so they're really fast on the client.