-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug mode not working as expected #80
Comments
Hi, debug mode is working like here https://github.com/kriswallsmith/assetic#asset-factory On |
Thanks a lot for your prompt reply. Anyway, what we all need -I think- is about the feature explained in the twig section of https://github.com/kriswallsmith/assetic#asset-factory
This behavior would be great in the view helper don't you think so ? |
Good point. |
Thanks a lot Gabriel, If you need help, I'd be happy to collaborate ;) Just tell me how you'd like to implement it (I wonder if we could utilize the assetic file : functions.php
|
I thinking of helper that will utilize For example, lets assume that we have following configuration: <?php
return array(
'assetic_configuration' => array(
'modules' => array(
'Your_Module_Name' => array(
'collections' => array(
'my_css' => array(
'assets' => array(
// Relative to 'root_path'
'css/reset.css',
'css/global.css',
),
'filters' => array(
'?CssRewriteFilter' => array(
'name' => 'Assetic\Filter\CssRewriteFilter'
),
'?CssMinFilter' => array(
'name' => 'Assetic\Filter\CssMinFilter' In layout.phtml in head section we use assetic helper like this: echo $this->assetic('my_css'); In debug mode enabled will produce:
In debug mode disabled will produce:
This is my proposition. |
Greg, help as always, is welcome :) |
Ok for your proposal with a precision and maybe an improvement: Today, for being able to render in the headscript, we have to put a "head_" prefix in the name of the asset. I don't like this.
So that we could use this 'render' option when each collection are rendered. Then, in the View helper, we'd use your proposal to render the collections depending on the general debug option. Of course, we can postpone this 'render' option after the debug view implementation. What do you think ? |
Good idea. Maybe even better would be to put
And thanks to that is even cleaner :) |
Fully agree ! Let's go ! How do you want to proceed and when ? Do you want me to do the dev and PR or do you have some time to help ? |
Today I don't have time but tomorrow I can help. |
Ok then, I won't be able to work on it this week (but I'll be this week-end) : This is the big sales week in France ! I'll keep you informed |
Ok. |
Ok, debug mode now (in devel branch) is working as expected. This commit explains what was changed: 08e0c50 Only thing that remains is to set options to view renderer strategy. |
Ok then. Thanks for that. I'll take care of the remaining option Cordialement, tel : +33 1 81 00 50 26 / mob : +33 6 85 88 55 00 [image: logo_signature_email.jpg] 2013/6/28 Gabriel Habryn notifications@github.com
|
I don't like the solution. We have collections with 20 js files and in debug mode now 20 requests. It would be better to introduce the $combine option. \Assetic\Extension\Twig\AsseticNode |
Thanks for tip. I'll add something like this |
Tommy you're right, Cordialement, tel : +33 1 81 00 50 26 / mob : +33 6 85 88 55 00 [image: logo_signature_email.jpg] 2013/6/28 Gabriel Habryn notifications@github.com
|
Yes, I am ]:-> There is one use case that can give you benefit of such approach.
|
As explained and asked by Tommy, I'll add the combine option on the same level as the debug one in compliancy with what is done in the original assetic stack. Plan to PR this tomorrow in the afternoon. |
Exellent. |
Hi all, What is the status of this discussion? Is this done? |
Hi Andy, The combine option has been added and Gabriel has accepted the PR. However, I'm not sure if it has been tagged and released in the last stable version. Gabriel ? |
Hi, sorry for delay. I was on vacations. |
Dear all,
First of all, I'm really thankfull for your work on Zf2-assetic. Thank you :)
I can't figure out how to set the debug mode so that the js and css aren't combined in one file but stay file by file so that debugging is feasable.
If I set debug as true, it doesn't produce anything... Any help would be appreciated (or is it a bug ?)
The text was updated successfully, but these errors were encountered: