1
0

requirejs.rb 824 B

123456789101112131415161718192021222324252627282930313233
  1. module Docs
  2. class Requirejs < UrlScraper
  3. self.name = 'RequireJS'
  4. self.type = 'requirejs'
  5. self.version = '2.1.18'
  6. self.base_url = 'http://requirejs.org/docs/'
  7. self.links = {
  8. home: 'http://requirejs.org/',
  9. code: 'https://github.com/jrburke/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. plugins.html
  19. why.html
  20. whyamd.html)
  21. html_filters.push 'requirejs/clean_html', 'requirejs/entries'
  22. options[:container] = '#content'
  23. options[:follow_links] = false
  24. options[:only] = self.initial_paths
  25. options[:attribution] = <<-HTML
  26. &copy; 2010&ndash;2015 The Dojo Foundation<br>
  27. Licensed under the MIT License.
  28. HTML
  29. end
  30. end