requirejs.rb 848 B

12345678910111213141516171819202122232425262728293031323334
  1. module Docs
  2. class Requirejs < UrlScraper
  3. self.name = 'RequireJS'
  4. self.type = 'requirejs'
  5. self.release = '2.3.1'
  6. self.base_url = 'http://requirejs.org/docs/'
  7. self.links = {
  8. home: 'http://requirejs.org/',
  9. code: 'https://github.com/requirejs/requirejs'
  10. }
  11. self.root_path = 'api.html'
  12. self.initial_paths = %w(
  13. optimization.html
  14. jquery.html
  15. node.html
  16. dojo.html
  17. commonjs.html
  18. errors.html
  19. plugins.html
  20. why.html
  21. whyamd.html)
  22. html_filters.push 'requirejs/clean_html', 'requirejs/entries'
  23. options[:container] = '#content'
  24. options[:follow_links] = false
  25. options[:only] = self.initial_paths
  26. options[:attribution] = <<-HTML
  27. &copy; jQuery Foundation and other contributors<br>
  28. Licensed under the MIT License.
  29. HTML
  30. end
  31. end