1
0

knockout.rb 999 B

12345678910111213141516171819202122232425262728293031323334353637
  1. module Docs
  2. class Knockout < UrlScraper
  3. self.name = 'Knockout.js'
  4. self.slug = 'knockout'
  5. self.type = 'knockout'
  6. self.release = '3.4.1'
  7. self.base_url = 'http://knockoutjs.com/documentation/'
  8. self.root_path = 'introduction.html'
  9. html_filters.push 'knockout/clean_html', 'knockout/entries'
  10. options[:follow_links] = ->(filter) { filter.root_page? }
  11. options[:container] = ->(filter) { filter.root_page? ? '#wrapper' : '.content' }
  12. options[:only] = %w(
  13. json-data.html
  14. extenders.html
  15. deferred-updates.html
  16. unobtrusive-event-handling.html
  17. fn.html
  18. microtasks.html
  19. asynchronous-error-handling.html
  20. amd-loading.html)
  21. options[:only_patterns] = [
  22. /observable/i,
  23. /computed/i,
  24. /component/i,
  25. /binding/,
  26. /plugin/]
  27. options[:attribution] = <<-HTML
  28. &copy; Steven Sanderson, the Knockout.js team, and other contributors<br>
  29. Licensed under the MIT License.
  30. HTML
  31. end
  32. end