Skip to content

Commit

Permalink
v0.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
zfben committed Aug 30, 2011
1 parent 189b56c commit 1ef1609
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.rdoc
Expand Up @@ -77,7 +77,7 @@ support before and after events
# => <script src="/javascripts/lib.js?12345678"></script><script>lib('home')</script>

<%= lib 'home.css' %>
# => <script src="/javascripts/lib.js?12345678"></script><link rel="stylesheet" href="/stylesheets/home.css?12345678" />
# => <link rel="stylesheet" href="/stylesheets/home.css?12345678" /><script src="/javascripts/lib.js?12345678"></script>

<%= lib 'home.js' %>
# => <script src="/javascripts/lib.js?12345678"></script><script src="/javascripts/home.js?12345678"></script>
# => <script src="/javascripts/home.js?12345678"></script><script src="/javascripts/lib.js?12345678"></script>
23 changes: 9 additions & 14 deletions lib/zfben_libjs.rb
Expand Up @@ -25,19 +25,15 @@ def tip msg
STDOUT.print "#{msg}\n".color(:green)
end

module Zfben_libjs
class Libjs

def build!
tip '== Starting Build'

if @opts[:config].has_key?('before')
load @opts[:config]['before']
end


tip '== [1/2] Starting Progress Source =='
length = @libs.length
class Zfben_libjs::Libjs
def build!
tip '== Starting Build'

if @opts[:config].has_key?('before')
load @opts[:config]['before']
end
tip '== [1/2] Starting Progress Source =='
length = @libs.length
num = 0
@libs.each do |name, urls|
num = num + 1
Expand Down Expand Up @@ -295,5 +291,4 @@ def build!

tip '== End Build =='
end
end
end
Empty file.
Empty file added lib/zfben_libjs/compile/css.rb
Empty file.
Empty file added lib/zfben_libjs/compile/js.rb
Empty file.
Empty file added lib/zfben_libjs/compile/rb.rb
Empty file.
Empty file added lib/zfben_libjs/compile/sass.rb
Empty file.
Empty file added lib/zfben_libjs/compile/scss.rb
Empty file.
4 changes: 2 additions & 2 deletions lib/zfben_libjs/railtie.rb
Expand Up @@ -3,7 +3,7 @@
module Rails
module ActionView::Helpers::AssetTagHelper
def lib *opts
html = lib_js('lib.js')
html = ''
unless opts.blank?
preload = []
lib_preload = []
Expand All @@ -25,7 +25,7 @@ def lib *opts
end
end
if lib_preload.length > 0
html << "<script>lib('#{lib_preload.join(' ')}')</script>"
html << lib_js('lib.js') << "<script>lib('#{lib_preload.join(' ')}')</script>"
end
end
return html
Expand Down

0 comments on commit 1ef1609

Please sign in to comment.