1

There are a lot of css packages on packagist.org

Example:

After adding the package to composer.json and running composer update, the the library are loaded in the vendor/ folder.

What is the best practice to move the css and js sources to the public/ folder?

Antonio Carlos Ribeiro
  • 86,191
  • 22
  • 213
  • 204
Yada
  • 30,349
  • 24
  • 103
  • 144
  • 1
    When I was researching this I found most developers saying that those packages are more of a hack and should not even be available on Packagist. Packagist should just be for PHP packages. For frontend related dependency management you should instead use something like Bower - https://github.com/bower/bower – fl3x7 Jul 30 '13 at 21:57

1 Answers1

1

Yes, you have to copy them to public.

CSS, JavaScript, image and video files should be available to your public.

Never symlink your vendor or app dir to public.

Your less or sass files might be exposed on public, but you'll see some coders that doesn't like to and other (like, Basset author, Jason Lewis -- https://twitter.com/jasonclewis/status/342544008687546368#) that thinks they should.

Antonio Carlos Ribeiro
  • 86,191
  • 22
  • 213
  • 204