devdocs/lib/docs/scrapers/immutable.rb
2022-12-25 11:24:30 +01:00

35 lines
896 B
Ruby
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Docs
class Immutable < UrlScraper
self.name = 'Immutable.js'
self.slug = 'immutable'
self.type = 'simple'
self.release = '4.2.1'
self.base_url = "https://immutable-js.com/docs/v#{release}/"
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