# \[ANN\] Styles 'n Scripts v0.5

**URL:** <https://www.ruby-forum.com/t/ann-styles-n-scripts-v0-5/142348>\
**Category:** Radiant CMS\
**Created:** [July 7, 2008, 6:40am UTC](https://www.ruby-forum.com/t/ann-styles-n-scripts-v0-5/142348 "2008-07-07T06:40:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahadewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Post date:** [July 7, 2008, 6:40am UTC](https://www.ruby-forum.com/t/ann-styles-n-scripts-v0-5/142348/1 "2008-07-07T06:40:03Z")

</div>

Some new features, refactoring, and bug squishing. Latest version can  
be found at:  
[https://secure.svnrepository.com/s\_swanki/open/radiant/extensions/styles\_n\_scripts/tags/latest](https://secure.svnrepository.com/s_swanki/open/radiant/extensions/styles_n_scripts/tags/latest)

For those with inquiring minds, the changes (taken from HISTORY) are:

Lots of improvements here. Some new features some just refactoring.

Added Shards to the edit view so now this extension can be extended  
(watch for SnS extension extensions to come soon).

Added support for filters. The only real one planned is Sass for the  
CSS files but, the way I did it, it’s pretty extensible (based on how  
Radiant handles page content filters). Did I mention that there were  
some SnS extension extensions coming soon…

Changed the way stylesheet and javascript urls were routed and evaluated  
(now its a before\_filter hooked into SiteController’s show\_page method).  
This has the added bonus of allowing the stylesheet and javascript  
directories to be changed during runtime (see next point).

Configurations are now handled differently. Rather than setting them  
once at load-time, they are changed dynamically via Rake tasks. The  
only exception is the caching directory – you really don’t want to do  
that one dynamcially – so it’s been pulled out of the config and made a  
constant.

Caching is more better. No more caching the whole url path – just the  
file, thank you. This makes it possible to change the directory name  
on the fly.

Bug fixes:

- Added a ‘url’ definition (just “”) to the extension to fix an issue  
with a change in Radiant 0.6.7 behavior (I really shoulda done that  
all along).

- Corrected an issue where this extension is included as part of a new  
Radiant install. The RAKE db:bootstrap task would initialize the  
extension which would then try to write the default settings to a  
not-yet-existing config table.

Enjoy

-Chris
