在Node js应用程序中加载ribs.js [英] Loading backbone.js in a node js app

查看:69
本文介绍了在Node js应用程序中加载ribs.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Web应用程序使用node.js和骨干网.骨干是我的包裹要求的一部分.我以前使用过Rails和Backbone,而辅助宝石非常适合将需要到达客户端的所有资产(js文件)拼凑在一起.

I'm using node.js and backbone for a web app. Backbone is part of my package requirments. I've used Rails and Backbone before, and the helper gems are nice for piecing together all the assets (js files) that need to get to the client.

话虽如此,我必须手动下载ribs.js并手动将其和所有其他受支持的js库添加到应用程序布局文件的标头中.

With that said, I had to manually download backbone.js and manually add it and all the other supported js libraries in the header of my app's layout file.

是否应该安装骨干模块使我摆脱为客户端应用程序创建所需源代码的手动工作?是否存在某种干扰/资产管道?

Should installing the backbone module get me away from that manual effort to create the required source for my client app? Is there some kind of jammit/asset pipeline?

推荐答案

您应该在主目录中简单地npm install backbone,这样,您使用的所有子模块都将找到此确切的主干,并将使用它

you should simply npm install backbone in your main directory, this way all the submodules you use will find this exact backbone, and will use it

此外,通过这种方式,您可以轻松扩展带有其他子模块的主干

moreover, this way you can easily extend backbone with additional submodules

这篇关于在Node js应用程序中加载ribs.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆