public
Fork of othermedia/ojay
Description: Wrapper for YUI 2.4 upwards with a concise API and asynchronous method chaining
Homepage: http://ojay.othermedia.org
Clone URL: git://github.com/ionfish/ojay.git
ojay / Rakefile
100644 18 lines (13 sloc) 0.475 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
task :deps do
  pkg = ENV['pkg']
  
  dir = [File.join('source', 'packages', pkg), File.join('source', pkg)].
        find(&File.method(:directory?))
  
  files = Dir.entries(dir).map { |f| File.join(dir, f) }.
          select(&File.method(:file?))
  
  files.map(&File.method(:read)).join("\n").
  scan(/\b(?:YAHOO|Y|lang|util|widget|tool|JS|Ojay)(?:\.[A-Za-z0-9\_\$]+)+(?:\s*=)?/).
  flatten.
  map { |s| s.gsub(/^YAHOO\./, '') }.
  uniq.sort.
  each(&method(:puts))
end