twitter-bootstrap-rails Gem adds a LOT of .js files to the page, doesn't it?

64 views
Skip to first unread message

Bizt

unread,
Jan 31, 2014, 7:12:11 PM1/31/14
to rubyonra...@googlegroups.com
Hi,

I've installed twitter-bootstrap-rails to my app but when I view the source code I see.

<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-transition.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-alert.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-modal.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-dropdown.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-scrollspy.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-tab.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-tooltip.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-popover.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-button.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-collapse.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-carousel.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-typeahead.js?body=1"></script>
<script data-turbolinks-track="true" src="/assets/twitter/bootstrap/bootstrap-affix.js?body=1"></script>


Is there something about rails assets in that it condenses all these together in a single file to improve performance (fewer files to download).  Why is this not happening here? Shouldn't it be, or have I not set something?

Bizt

unread,
Feb 1, 2014, 1:33:07 AM2/1/14
to rubyonra...@googlegroups.com
Oh, I think I see. In production ONLY it condenses them all down to a single file? Just realized now.

Frederick Cheung

unread,
Feb 1, 2014, 7:00:06 AM2/1/14
to rubyonra...@googlegroups.com


On Saturday, February 1, 2014 6:33:07 AM UTC, Bizt wrote:
Oh, I think I see. In production ONLY it condenses them all down to a single file? Just realized now.

That is the default. If my memory is correct it's the config.assets.debug setting which controls this.

Fred 
Reply all
Reply to author
Forward
0 new messages