I've created a new environment called 'staging' which is pretty much the same config as the 'production' environment and I'm trying to use yui_compressor on my css and js files. Please see an example of my css files below:
{% stylesheets output='css/compiled/main.css' filter='?yui_css' filter='cssrewrite'
'bundles/xyz/lib/frontend/css/social_foundicons.css'
'bundles/xyz/lib/frontend/css/general_enclosed_foundicons.css'
'bundles/xyz/lib/frontend/css/general_foundicons.css'
'bundles/xyz/lib/frontend/coda/css/coda-slider.css'
%}
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset_url }}" />
{% endstylesheets %}
<!-- Google fonts -->
{% stylesheets output='css/compiled/fonts.css' filter='?yui_css' filter='cssrewrite'
'bundles/xyz/lib/frontend/css/fonts.css'
%}
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset_url }}" />
{% endstylesheets %}
<!-- Included CSS Files -->
{% stylesheets output='css/compiled/style.css' filter='?yui_css' filter='cssrewrite'
'bundles/xyz/lib/frontend/css/style.css'
%}
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset_url }}" />
{% endstylesheets %}
When deploying using capistrano the following files are created:
This I assume is correct, however the header in my application renders the following:
<link rel="stylesheet" type="text/css" media="screen" href="/css/compiled/main_social_foundicons_1.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/compiled/main_general_enclosed_foundicons_2.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/compiled/main_general_foundicons_3.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/compiled/main_coda-slider_4.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/compiled/fonts_fonts_1.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/compiled/style_style_1.css" />
None of the above files exist on the server and I assume it should be calling /css/compiled/fonts.css, main.css and style.css.
Anyone know why it's doing this?
Thanks
The problem was that I had debug mode set to true for the staging environment.