Assets - Puzzlout/DevGuidelines GitHub Wiki

OK, so everything should be stored in /web/ directory, since that's public available directory. Now if you will notice in that .gitignore template file /web/bundles/ and /web/uploads/ are ignored. That's because all stuff should be stored in the bundle directory and copied over before running. So we go in /src/ directory where our bundles reside. Let's say we want to use new bundle Puzzlout/FooBundle/. We go in /src/Puzzlout/FooBundle/ and create Resource directory if it isn't already there, inside we should create directory named public in lowercase, in that directory we should put all our static files. Before running app, we can install those assets in public web directory, by running "php bin/console assets:install --symlink" (note symlink param, it should work on OSX and Linux which will create symbolic link instead of hard copy). What this command will do is "copy" (or sym link) all stuff from public directory of our bundle into /web/bundles/puzzloutfoo/ directory, and we will be able to publicly access all those static files.

Structure

public
  /css
  /js
  /images

References