Skip to content

Assetic fixes #1991

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

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Don’t suggest that it’s a good idea to remove the list of bundles ent…
…irely.
  • Loading branch information
gm-olivier committed Nov 29, 2012
commit 1e219c96e30b64eb2848d9fe43a23d1bd537af75
8 changes: 3 additions & 5 deletions cookbook/assetic/asset_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,16 @@ drawn from various sources such as from within a bundle:

.. tip::

For the above example to work, you must either add your bundle to the list
of bundles that Assetic is allowed to handle (which is *none* in a default
Symfony installation), or remove the bundle list from the configuration
altogether:
For the above example to work, you must also add your bundle to the list
of bundles that Assetic handles, which is empty by default:

.. code-block:: yaml

# app/config/config.yml
assetic:
debug: "%kernel.debug%"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%kernel.debug% is the default value for the assetic.debug setting, so I think this line isn't needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the config like this in the standard distribution though so its in keeping with that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small detail either way, but what I'd love the most is to use the # ... in this spot:

assetic:
    # ...
    bundles:    [ AcmeFooBundle ]
    filters:
        # ...

Also, is this new note actually correct yet? My impression is that you don't need to add your bundle to the bundles configuration until you place a stylesheets or javascripts tag into a template that lives inside that bundle. If your stylesheets or javascripts tags are only in a template in app/Resources/views (even if you're referencing CSS/JS files that are in some bundle), then you don't need to add the bundle to the bundles key.

If I'm wrong, some please shout at me! :) I just wanted to make sure we were clear on that before merging.

Thanks!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My impression is that you don't need to add your bundle to the bundles configuration until you place a stylesheets or javascripts tag into a template that lives inside that bundle.

I strongly suspect that you are correct. It makes a lot more sense to me now. I’ll make some tests next week and rewrite accordingly.

use_controller: false
#bundles: [ ]
bundles: [ AcmeFooBundle ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be [AcmeFooBundle]

filters:
# ...

Expand Down