I am looking for a javascript template engine that comes with script + watcher precompilation. How would I see it:
- You write files as typical html layouts and store them in files like mustache.
- You run an observer in the console, which tracks changes in files and compiles them into .js files, where the template is processed as a function that concatenates strings and inserts the values of variables.
- These files are used in the application.
This mechanism will solve the problem of the cross-domain process when downloading files like non-js, and it is also easy to combine them into one file for performance reasons.
From the research I did, only handbars.js promises to send this feature in the future. Would be glad to know if anyone else has done this?
lyuba source
share