Jeff Barczewski
2006-Jul-05 17:56 UTC
[Masterview-devel] FW: Proposed name/structure of config setting for asset path refs
Yeah, I did not get that notification. I didn''t see the commit note I made earlier either, so I will email Tom. I like your idea for the directory registry. I too hate having a large proliferation of new but similar settings. On 7/5/06, Deb Lewis <djlewis at acm.org> wrote:> > Jeff - I think our masterview lists are down again - did you get this msg > I > sent last night? And another followed with some discussion of new > DirectiveRegistry mechanism I committed last night (moving some of the > existing code around to prepare for handling multiple directive > namespaces) > > ~ Deb > > -----Original Message----- > From: Deb Lewis [mailto:djlewis at acm.org] > Sent: Tuesday, July 04, 2006 10:59 PM > To: ''masterview-devel at rubyforge.org'' > Subject: Proposed name/structure of config setting for asset path refs > > Jeff - ok, here''s a proposal for config settings to specify how to > identify > the design-time directory ref prefix on image/stylesheet/js assets. > > Config setting name ''template_asset_base_ref_pattern'', structured as a > hash > with keys :images, :stylesheets, and :javascripts per the standard naming > convention in rails public dir for these assets. > > The defaults for these are your xxx_SRC_EXTRACT_REGEX''s in the asset > helper > directives that match ugly rel refs up from app/views to rails public dir > (../../../public/stylesheets/xxx.css) > > I like one config setting with hash entries rather than proliferating a > trio > of new settings names. Partly because I think we may need a matching > config > setting for handling customization of the dir names in the public dir, but > I > need to revisit that area of rails first to review the mechanics - you can > if you choose rename your public/stylesheets dir to, say, public/styles. > > See javadoc below; will add this to the config doc and settings > example/gen-templates after names are settled on. > > ~ Deb > > ---------------------------------------------------- > template_asset_base_ref_pattern > > Regex pattern specifications for identifying the base directory on asset > references in a template document to convert design-time assert references > for images, stylesheets, and javascript files into relative references for > use with the standard Rails asset helper functions. > > Asset types are :images, :stylesheets, :javascripts > > The standard patterns match path prefixes up through public/asset-type. > For > example, an mv:stylesheet_link directive of the form: > > <link rel="stylesheet" type="text/css" > href="../../../public/stylesheets/mystyles.css" mv:stylesheet_link="" /> > > would match the standard base-dir prefix and result in: > > <%= stylesheet_link_tag "mystyles" %> > > ---------------------------------------------------- > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-devel/attachments/20060705/c9bf609b/attachment.html