On 25 August 2011 18:51, Intransition <transfire / gmail.com> wrote:
>
>
> On Aug 24, 11:48am, Richard Conroy <richard.con... / gmail.com> wrote:
>> On Wed, Aug 24, 2011 at 4:38 PM, Intransition <transf... / gmail.com> wrote:
>> > What conventions have evolved for placing reusable website assets in a
>> > project? Do people just mix in all a components assets in with the
>> > other assets,
>>
>> >  cp -r foo/assets/images/* mysite/assets/images/
>> >  cp -r foo/assets/stylesheets/* mysite/assets/stylesheets/
>> >  ...
>>
>> Is this for content across projects? For example, company logos, flash
>> animations?
>
> In my case it's for website libraries, e.g. highlight.js (http://
> softwaremaniacs.org/soft/highlight/en/).
>
>> I have heard of companies making very atomic versions of gems to take DRY
>> concepts across projects.
>>
>> Perhaps it might work well for static assets too.
>
> Actually it looks like I will be doing that too. But it still leaves
> the question of where to put files in the end product.

Since you are going to use gems it solves your question. gems separate
files of each gem into a separate directory.

In general separate directories are easy to manage manually.
Installing/updating/replacing a package is easy then.

Using unified location across packages (like FHS) requires a package
manager that tracks which files are part of what so that they can be
later removed or upgraded easily and lends itself to modularity. You
can reference some file like images/site-logo.png and have several
packages that provide the file and several others that reference it,
and it will work as long as one of the packages that provides the logo
is present.

Still you might want to glob images/site-logo.* in case you had a gif
or svg logo, and then you can glob */images/site-logo.* equally well.

Thanks

Michal