3 ms·
The RequireJS plugin system is really useful. Alex Sexton's handlebars plugin is a great example of what sets this apart: https://github.com/SlexAxton/require-
by tristan_juricek 13y ago
The RequireJS plugin system is really useful.
Alex Sexton's handlebars plugin is a great example of what sets this apart:
https://github.com/SlexAxton/require-handlebars-plugin https://github.com/SlexAxton/require-handlebars-plugin
- The javaScript code only sees the compiled template function
- Handlebars partials and helpers are automatically discovered and registered as needed
- The optimizer can be used to precompile all template code, makes for fast page loads
I've been using this with an i18n solution that folds in the MessageFormat.js project as well, which makes for a nice pluralization system even if you don't need true localization.