Przemek
Przemek

Reputation: 6700

Is it possible to install bundle assets directly in web/ directory?

By default, symfony takes a bundle's assets from the bundle's public/ directory and installs them in web/bundles/bundlename/.

Is it possible to install those assets directly in web/ instead?

Upvotes: 1

Views: 187

Answers (2)

malarzm
malarzm

Reputation: 2966

The /bundles/ part is pretty much hardcoded so there's no built in support for such assets installation. I believe you'll be best served by implementing your own command for this task.

Upvotes: 2

Alsatian
Alsatian

Reputation: 3135

Simply never call assets:install, and list the assets you want in your template :

{% javascripts '@VendorBundle/Resources/public/js/*' %}
    <script src="{{ asset_url }}"></script>
{% endjavascripts %}

Upvotes: 1

Related Questions