0
我正在使用Rails的資產管道來連接所有的CSS/JS(儘管我想象我使用的特殊連接方法可能不會產生太大的影響區別)。jQuery UI的@imports導致很多HTTP請求,破壞了連接的目的
我遇到的問題是,jQuery UI擁有所有這些@import
指令,因此我爲每個單獨的CSS文件獲取單獨的HTTP請求jQuery UI想要導入,這是其中的很多。這在開發和生產中都會發生。我的其他連接完美地工作;它只是jQuery UI的東西。
這裏是我的application.css
,如果它可以幫助:
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require vendor
*= require scaffold
*= require main
*= require clients
*= require appointments
*= require marketing
*= require services
*= require reports
*= require calendar
*= require products
*= require stylists
*= require brochure
*/
我所有的jQuery UI的CSS是vendor
:
$ ll vendor/assets/stylesheets/jquery_ui/
total 216
drwxr-xr-x 18 jason staff 612 Jun 21 11:48 .
drwxr-xr-x 5 jason staff 170 Jun 21 11:42 ..
-rw-r--r-- 1 jason staff 35010 Mar 12 12:55 jquery-ui.css
-rw-r--r-- 1 jason staff 1064 Jun 21 11:48 jquery.ui.accordion.css
-rw-r--r-- 1 jason staff 290 Jun 21 11:48 jquery.ui.all.css
-rw-r--r-- 1 jason staff 1106 Mar 12 12:55 jquery.ui.autocomplete.css
-rw-r--r-- 1 jason staff 658 Jun 21 11:48 jquery.ui.base.css
-rw-r--r-- 1 jason staff 2470 Jun 21 11:48 jquery.ui.button.css
-rw-r--r-- 1 jason staff 1458 Mar 12 12:55 jquery.ui.core.css
-rw-r--r-- 1 jason staff 4045 Jun 21 11:43 jquery.ui.datepicker.css
-rw-r--r-- 1 jason staff 1357 Mar 12 12:55 jquery.ui.dialog.css
-rw-r--r-- 1 jason staff 356 Jun 21 11:48 jquery.ui.progressbar.css
-rw-r--r-- 1 jason staff 1170 Jun 21 11:48 jquery.ui.resizable.css
-rw-r--r-- 1 jason staff 322 Jun 21 11:48 jquery.ui.selectable.css
-rw-r--r-- 1 jason staff 1139 Jun 21 11:48 jquery.ui.slider.css
-rw-r--r-- 1 jason staff 1382 Mar 12 12:55 jquery.ui.tabs.css
-rw-r--r-- 1 jason staff 19141 Jun 20 22:38 jquery.ui.theme.css
drwxr-xr-x 18 jason staff 612 Jun 21 11:48 minified
我怎樣才能讓我的所有jQuery UI的文件得到級聯像我希望他們能?