devdocs/lib/docs/scrapers/immutable.rb

36 lines
891 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

module Docs
class Immutable < UrlScraper
self.name = 'Immutable.js'
self.slug = 'immutable'
self.type = 'simple'
self.release = '4.0.0'
self.base_url = 'https://immutable-js.com/docs/v4.0.0/'
self.links = {
home: 'https://immutable-js.com/',
code: 'https://github.com/facebook/immutable-js'
}
html_filters.push 'immutable/clean_html', 'immutable/entries'
options[:container] = '.docContents'
options[:root_title] = 'Immutable.js'
options[:trailing_slash] = true
options[:fix_urls] = ->(url) do
url.sub! '/index.html', ''
url.sub! '/index', ''
url
end
options[:attribution] = <<-HTML
&copy; 2014present, Lee Byron and other contributors<br>
Licensed under the 3-clause BSD License.
HTML
def get_latest_version(opts)
get_npm_version('immutable', opts)
end
end
end