Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (36 sloc) 1.294 kb
use rvm to test locally under 1.8.6
rename to_s to to_html
change instance vars to start with @_
rename 'user guide' to 'documentation' or something more clear
(DONE) rename "external" to "depends_on"
(DONE) variant syntaxes for "depends_on"
depends_on :js => ["foo.js", "bar.js"]
depends_on FooWidget, BarWidget
-- add all of these widgets' dependencies
(DONE) cleverly figure out the external type
depends_on "foo.js"
depends_on "foo.css"
depends_on File.new("foo.js")
depends_on File.new("foo.css")
unify :script and :js, :style and :css
make render switch inside ExternalRenderer
class FooWidget < Widget
depends_on "jquery.js", :render => :link
depends_on "foo.js"
depends_on "bar.js"
end
ExternalRenderer.default_render = :embed
pluggable renderer e.g.
class JavaScriptRenderer < Widget
def content
if @external.options[:render] == :embed
javascript @external.options do
rawtext @external.text
end
else
script({:type => "text/javascript", :src => @external.text}.merge(@external.options))
end
end
end
ExternalRenderer.renderer_for(:js, JavaScriptRenderer)
rename 'css' convenience method to 'css_link' method, or otherwise remove confusion between inline and linked css
Jump to Line
Something went wrong with that request. Please try again.