Loading backbone.js into node js application

I am using node.js and backbone for a web application. The back end is part of my package requirements. I used to use Rails and Backbone, and helper gems are good for combining all the assets (js files) that a client needs to get.

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

Should installing the base module relieve me of this manual effort in order to create the necessary source for my client application? Is there any jammit / asset pipeline?

+4
source share
2 answers

you just need npm install backbone in your main directory, so all the submodules you use will find this exact base and use it

In addition, this way you can easily expand the trunk with additional submodules

+1
source

I use the stitch package to serve my scripts in node applications. That being said, it is as simple as listing backbone.js as dependencies, and I install it using npm . It's comfortable.

+1
source

Source: https://habr.com/ru/post/1396729/


All Articles