我怎样才能precompile HandlebarsJS从Visual Studio模板? [英] How can I precompile HandlebarsJS templates from Visual Studio?
本文介绍了我怎样才能precompile HandlebarsJS从Visual Studio模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能precompile把手模板从Visual Studio的或在MVC Web应用程序的一个App_Start事件postbuild?
在此先感谢这么多。
戴尔
Is it possible to precompile Handlebars Templates from a postbuild event of Visual Studio or in the App_Start of a MVC web app? Thanks so much in advance. Dale
推荐答案
当然,你有很多选择:
- 您可以安装Node.js的窗户和NPM,并配置生成后事件汇编(<一个href=\"http://stackoverflow.com/questions/11938892/$p$pcompiling-handlebars-js-templates-in-windows\">example这里从previous问题)
- 如果您正在使用ember.js,这里是一个使用捆绑改造,实现$ P $实现 pcompilation。
- 另一个用于支持组件ember.js,这里的实施,也使用捆绑改造。
- 下面是一个<一个href=\"http://ianobermiller.com/blog/2012/07/25/$p$pcompile-handlebars-template-in-net-using-jurassic/\">example在C#编译使用侏罗纪JavaScript编译器的
- You can install node.js for windows and npm, and configure a post-build event to the compilation (example here from previous question)
- If you're using ember.js, here's an implementation that uses bundle transformation to achieve precompilation.
- Another for ember.js that supports components, here's the implementation, that also uses bundle transformation.
- Here is an example of compilation on C# using the Jurassic javascript compiler
这篇关于我怎样才能precompile HandlebarsJS从Visual Studio模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文