Trying out the example usage of “codebrew rails-backbone,
everything works fine but the amount of javascript files included is far too big.
All the models, routers, views, templates are loaded, which amounts to 15 javascript includes.
Is there any way to reduce this number?
There is no reason to do this, it is done out of the box with rails. While your rails instance is in development mode, you get all separate javascript and css files. When you switch it to production, it’s concatenated and minified into one file.
See:
http://guides.rubyonrails.org/asset_pipeline.html#in-production
You can see this for yourself by doing