mozilla / nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
https://mozilla.github.io/nunjucks/
BSD 2-Clause "Simplified" License
8.59k stars 639 forks source link

make separate loader for precompiled templates #194

Closed sunflowerdeath closed 9 years ago

sunflowerdeath commented 10 years ago

If i replace WebLoader with my own loader, precompiled templates are not available.

Usage of precompiled templates does not mean than I want to use WebLoader. For example, i can have my templates in <script> tag on the page, not somewhere in the web, but in the same time I want to use some templates in precompiled way.

If u will make separate loaders for precompiled templates and for web loading, it will be possible to use precompiled templates loader with my own loaders together.

Here's example of separate loaders: https://gist.github.com/sunflowerdeath/9093146

mattbasta commented 10 years ago

You shouldn't need a loader if you're precompiling your templates. You should just need to include the precompiled templates' script in your page, or include the script as part of a larger minified bundle. On Feb 19, 2014 6:28 AM, "sunflowerdeath" notifications@github.com wrote:

If i replace WebLoader with my own loader, precompiled templates are not available.

Usage of precompiled templates does not mean than I want to use web loader. For example, i can have my templates in Githubissues.

  • Githubissues is a development platform for aggregating issues.