Reputation: 517
I'm using kriswallsmith/assetic(symfony/AsseticBundle) bundle for Symfony2, I was looking for a way to render only part of the files using assetic:dump.
I'm explain my self: My app as some assets for admin management, and other for frontend, I would like to be able to dump only front assets, is it possible ?
this assetic:dump is also alway rendering both files for app_dev.php and app.php is there a way to tell him to render only the compiled css/js ?
Thanks
Upvotes: 0
Views: 56
Reputation: 1373
In your app/config/config.yml, where you have your assetic configuration, you can add this:
assetic:
#####
assets:
this_is_the_name_of_the_dumpfile:
inputs:
- %kernel.root_dir%/../web/css/style.css
- another/path/to/another/file
- ######
filters:
- yui_js
- other_defined_filter
And if you configured assetic to dump files to /web/assetic/, add in your twig file the path to the dumped file: {{ asset('assetic/this_is_the_name_of_the_dumpfile.css') }}
Upvotes: 1