[英]Rails 3.1 Asset pipeline
I am fairly new to rails and Jquery and am looking for some guidance on which libraries I should keep and which one I don't need. 我对Rails和Jquery还是很陌生,并且正在寻找有关应该保留哪些库以及不需要哪些库的指南。
Anyway currently I have the following in my javascript library 无论如何,目前我的javascript库中包含以下内容
admin.js.coffee
application.js
bootstrap-alert.js
calendar.js
documents.js.coffee
folders.js.coffee
fullcalendar.js
gcal.js
jquery-1.7.min.js
jquery-ui-1.8.9.custom.min.js
jquery-ui.js
jquery-ui.min.js
jquery.bookshelfslider.js
jquery.bookshelfslider.min.js
jquery.easing.1.3.js
jquery.js
jquery.rest.js
jquery.ticker.js
jquery_ujs.js
rails.js
site.js
stickybar.jquery.min.js
stickysidebar.jquery.js
turn.js
My application.js file looks like this 我的application.js文件如下所示
//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require twitter/bootstrap
//= require_tree .
Is there anything anyone can see that would cause me any issues? 有谁能看到会导致我任何问题的任何东西? if I am calling a library within application.js, do I need the library in my Javascript directory? 如果我在application.js中调用一个库,我的Javascript目录中是否需要该库?
Any advice appreciated 任何建议表示赞赏
rails.js
is the legacy name of jquery_ujs.js
. rails.js
是jquery_ujs.js
的旧名称。 You can remove the former. 您可以删除前者。
Also, you don't need to store the following file in the javascripts directory 另外,您无需将以下文件存储在javascripts目录中
jquery-1.7.min.js
jquery-ui-1.8.9.custom.min.js
jquery-ui.js
jquery-ui.min.js
jquery.js
rails.js
Simply install jquery-rails gem. 只需安装jquery-rails gem。
For more information, here's the Rails 3.1 asset pipeline guide . 有关更多信息,请参见Rails 3.1资产管道指南 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.