Javascript that will come with a pre-compiled script?

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?

+3
source share
2 answers

You can try this solution for javascript client templates https://github.com/kupriyanenko/jsttojs

+1
source

https://github.com/visionmedia/jade it does not take time to learn and do whatever you need.

0
source

All Articles