The problem is that you *can't* assume that the img folder remains relative
to the css folder. People are putting jQuery inside of other directory
structure (like Rails or Merb) which have their own conventions, and then
it's up to the individual developer to figure out how to modify the relative
paths.
I'd like to be able to automate the installation of jQuery plugins, which
means not having to figure this out manually.

-- Yehuda

On Fri, Oct 3, 2008 at 8:54 AM, Ca-Phun Ung <[EMAIL PROTECTED]> wrote:

> Hi Yehuda,
> Interesting proposal.
>
> A note on CSS images. I'm not sure the %imageDir% token will be of any use
> in CSS because CSS is capable of locating images relative to itself. i.e.
> if we have a structure like
>
> /assets
>   -- /css/style.css
>   -- /img/logo.png
>
> Then as long as the img folder remains relative to the css folder,
> whereever it is copied the following will always hold true:
>
> _style.css_
>
>   div#logo {
>     background: url( ../img/logo.png ) no-repeat;
>   }
>
>
>
> On Fri, Oct 3, 2008 at 2:31 PM, Yehuda Katz <[EMAIL PROTECTED]> wrote:
>
>> For a while, I've been trying to make it possible to build a system to
>> automatically install jQuery plugins into an application. In particular,
>> I've wanted to be able to let Merb (a Ruby web framework I maintain --
>> http://merbivore.com/) install jQuery plugins simply and easily.
>> There are a few problems I needed to see solved:
>>
>>    - A way for package authors to describe the locations of the
>>    javascript files, the CSS files, and any images
>>    - A way for package authors to declare required dependencies
>>    - A way to write CSS files that don't need to provide explicit image
>>    paths
>>
>> I want to propose a packaging format that plugin authors can use. To get
>> the ball rolling, I'm proposing a JSON file called metadata.json:
>>
>> {
>>   "name": "tabs.jquery",
>>   "author": "Yehuda Katz",
>>   "dependencies": [
>>     "core.ui.jquery",
>>     "mouse.ui.jquery"
>>   ],
>>   "javascript": [
>>     "lib/utility.tabs.jquery",
>>     "lib/tabs.jquery",
>>   ],
>>   "cssDir": "css",
>>   "imageDir": "images"
>> }
>>
>> Additionally, I'd like to propose that CSS files containing image paths
>> use the token %imageDir% to refer to the directory where the images will be
>> placed. This will allow automated tools (or even users themselves) to
>> quickly modify CSS files with the correct relative (or absolute) path.
>>
>> Does this stuff make sense? People seemed to be, in general, in favor of a
>> more consistent package format, so I thought I'd get the ball rolling here.
>>
>> --
>> Yehuda Katz
>> Developer | Engine Yard
>> (ph) 718.877.1325
>>
>>
>>
>
>
> --
> Ca-Phun Ung
> + Yelotofu <http://yelotofu.com>
> + css, django, hongkong, html, javascript, php
>
> >
>


-- 
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to