Skip to content

Commit

Permalink
added handler for building a combined javascript file
Browse files Browse the repository at this point in the history
  • Loading branch information
auxesis committed Sep 11, 2009
1 parent be6fab6 commit 5588488
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions visage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
File.read('views/layout.haml')
end

# infrastructure for embedding
get '/javascripts/visage.js' do
javascript = ""
%w{raphael-min g.raphael g.line mootools-1.2.3-core mootools-1.2.3.1-more graph}.each do |js|
javascript += File.read(File.join(__DIR__, 'public', 'javascripts', "#{js}.js"))
end
javascript
end

# user facing
get '/' do
@hosts = CollectdJSON.hosts
Expand Down

0 comments on commit 5588488

Please sign in to comment.