Skip to content

Instantly share code, notes, and snippets.

@dator-zz
Created June 14, 2011 20:36
Show Gist options
  • Save dator-zz/1025810 to your computer and use it in GitHub Desktop.
Save dator-zz/1025810 to your computer and use it in GitHub Desktop.
assetic:
debug: %kernel.debug%
use_controller: false
filters:
cssrewrite: ~
sass: ~
yui_js:
jar: %kernel.root_dir%/java/yuicompressor.jar
yui_css:
jar: %kernel.root_dir%/java/yuicompressor.jar
{% stylesheets '@MyBundle/Resources/public/css/main.sass' filter="sass" output='css/all.css' %}
<link href="{{ asset_url }}" type="text/css" rel="stylesheet" />
{% endstylesheets %}
// Render
<link href="/css/all_main_1.css" type="text/css" rel="stylesheet" />
// - /css/all_main_1.css is a 404 url .
$blue: #3bbfce
$margin: 16px
.content-navigation
border-color: $blue
color: darken($blue, 9%)
.border
padding: $margin / 2
margin: $margin / 2
border-color: $blue
body
font-size: 5em
@kriswallsmith
Copy link

It looks like you have use_controller disabled, which means Assetic is relying on you to create the assets using the assetic:dump command.

@dator-zz
Copy link
Author

Event if i do a php app/console assetic:dump web the css file is 404 :s

I just tried to user assetic controller,

use_controller: %kernel.debug%

and

_assetic:
    resource: .
    type:     assetic

in the routing_dev.yml, i get an exception :

An exception has been thrown during the rendering of a template ("Route "_assetic_e54610a_0" does not exist.") in MyBundle::layout.html.twig at line 11.

Any thought ?

Thanks a lot for your help :)

@kriswallsmith
Copy link

kriswallsmith commented Jun 14, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment