kriswallsmith / assetic

Asset Management for PHP
MIT License
3.75k stars 555 forks source link

Limit assets to environment #209

Closed nurikabe closed 12 years ago

nurikabe commented 12 years ago

Nice feature to have. We have a few assets that we only want to use in the dev environment. Would be handy if we easily tag assets to a given environment. Maybe something like this:

    {% javascripts output='js/app.js' environment='dev'
        '%kernel.root_dir%/../vendor/hashgrid/hashgrid.js'
    %}
        <script type="text/javascript" src="{{ asset_url }}"></script>
    {% endjavascripts %}
schmittjoh commented 12 years ago

I don't think that you need assetic for that. Just use a plain if-check and standard asset includes in Twig.