Reputation: 456
Composer is a PHP package manager. I have looked through the documentation here: http://getcomposer.org/
I am looking to create a custom type "symfony2-assets" and have them install to the "web" directory instead of to the "vendor" directory.
I know i can change the config key "vendor-dir" to web to accomplish this but that also installs all of the other packages in there and i need those ones in the vendor directory.
If anyone has a good tutorial they have come across on this or knows how to do it, I would be most appreciative.
Upvotes: 1
Views: 1632
Reputation: 42036
You can create a package with type composer-installer
, and require it in your application. In theory packages of the type you want to handle (symfony2-asset2
) should require the installer to make sure it's installed first.
Your installer can just inherit from LibraryInstaller and put files wherever you want.
This should work for now, but in the long term I hope we can find a somewhat generic way of handling web assets in Composer. Our main focus is still PHP code for now though.
Upvotes: 7
Reputation: 15002
You can add post-install-cmd script that that will copy/make symlink to the web directory.
Upvotes: -1