From this tutortial i am learning about the powerfull Assetic tool. It is pretty awesome and something i wish i had known about before.

However in the blog tutorial it says that the way to disable minification in dev mode is to put a ? before the fiters in the stylesheet blocks..

{% stylesheets
    '@BloggerBlogBundle/Resources/public/css/*'
    output='css/blogger.css'
    filter='?yui_css'
%}

Is there a more efficient way of doing this? Ideally the code base should be idetical between dev and prod, but this way would not result in that, is there was a gloabally setting this on or off in the config_prod.yml and config_dev.yml?

Or does the question mark mean the minification will be run in prod but not dev?

有帮助吗?

解决方案

The question mark means that minification will run only when %kernal.debug% is set to true. This is regardless of the environment as you could set debug mode to true in production or false in dev or test environment. It is generally the case that debug mode is set to true for dev and false for prod though.

You read more about environments and a bit about debug mode in the documentation.

I hope that clarifies things a bit.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top