4

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.

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?

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

2 Comments

I included backbone in my package file, AND did an npm install. I can therefore see backbone in my node_modules folder... but that still doesn't load that file automatically for my client side javascript... Are you saying it should be included in my layout automatically?
nope, you should include it in your layout either using something like express-expose or via a script tag
1

I use the stitch package to serve my scripts in node apps. With that, it's as simple as listing backbone.js as a dependency, and I install it with npm. That's convenient.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.