Skip to content

Instantly share code, notes, and snippets.

@tal
Created May 12, 2010 21:36
Show Gist options
  • Select an option

  • Save tal/399162 to your computer and use it in GitHub Desktop.

Select an option

Save tal/399162 to your computer and use it in GitHub Desktop.
class << self
attr_accessor :cdn, :cdn_version, :root, :js_path, :write_path
end
if defined? Merb
JSCompilation.root = Merb.root_path
JSCompilation.js_path = File.join('public','javascripts')
elsif defined? RAILS_ROOT
JSCompilation.root = RAILS_ROOT
JSCompilation.js_path = File.join('public','javascripts')
else
JSCompilation.root = Dir.pwd
JSCompilation.js_path = ''
end
JSCompilation.write_path = File.join(JSCompilation.root,JSCompilation.js_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment