简体   繁体   English

将spine.js与haml一起使用

[英]Using spine.js with haml

currently I'm playing a little bit with spine.js I have red the documentation about views and there they have shown an example with eco as templating engine. 目前,我正在与spine.js一起玩一些游戏。我已经将视图的文档改成了红色,并且在那里他们展示了使用eco作为模板引擎的示例。 Until now i don't really like the eco engine. 直到现在我还不太喜欢环保引擎。 I would prefer to use haml as my templating engine. 我更喜欢使用haml作为模板引擎。

Is there a way to add support for haml in spine.js? 有没有办法在spine.js中添加对haml的支持?

Until now i tried to add https://github.com/uglyog/clientside-haml-js in my index.html and then i was able to compile haml templates, in my controller, to html. 到目前为止,我一直尝试在index.html中添加https://github.com/uglyog/clientside-haml-js ,然后我便能够在控制器中将haml模板编译为html。

But it is not possible to load the templates in the same way as it works wit the eco files. 但是无法以与生态文件相同的方式加载模板。

So how can I integrate haml into spine.js? 那么如何将haml集成到spine.js中呢?

Use hem-haml-coffee . 使用hem-haml-coffee

I recently added jhaml support as an equivalent to jeco. 我最近添加了对jhaml的支持,等同于jeco。

解决方案是将slug.js文件添加到包含相关内容的应用程序中,您将在此处找到更详细的解决方案: https ://groups.google.com/group/spinejs/browse_thread/thread/d951e77db33d084a

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM