2016-11-20 15:37:27 +01:00
|
|
|
|
module Docs
|
|
|
|
|
class Immutable < UrlScraper
|
|
|
|
|
self.name = 'Immutable.js'
|
|
|
|
|
self.slug = 'immutable'
|
2018-10-07 17:07:55 +02:00
|
|
|
|
self.type = 'simple'
|
2022-12-25 11:24:30 +01:00
|
|
|
|
self.release = '4.2.1'
|
2022-08-27 19:47:54 +02:00
|
|
|
|
self.base_url = "https://immutable-js.com/docs/v#{release}/"
|
2016-11-20 15:37:27 +01:00
|
|
|
|
self.links = {
|
2021-11-14 14:14:19 +01:00
|
|
|
|
home: 'https://immutable-js.com/',
|
2016-11-20 15:37:27 +01:00
|
|
|
|
code: 'https://github.com/facebook/immutable-js'
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-14 14:14:19 +01:00
|
|
|
|
html_filters.push 'immutable/clean_html', 'immutable/entries'
|
2016-11-20 15:37:27 +01:00
|
|
|
|
|
|
|
|
|
options[:container] = '.docContents'
|
|
|
|
|
options[:root_title] = 'Immutable.js'
|
|
|
|
|
|
2021-11-14 14:14:19 +01:00
|
|
|
|
options[:trailing_slash] = true
|
|
|
|
|
options[:fix_urls] = ->(url) do
|
|
|
|
|
url.sub! '/index.html', ''
|
|
|
|
|
url.sub! '/index', ''
|
|
|
|
|
url
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
2016-11-20 15:37:27 +01:00
|
|
|
|
options[:attribution] = <<-HTML
|
2021-11-14 14:14:19 +01:00
|
|
|
|
© 2014–present, Lee Byron and other contributors<br>
|
2016-11-20 15:37:27 +01:00
|
|
|
|
Licensed under the 3-clause BSD License.
|
|
|
|
|
HTML
|
|
|
|
|
|
2019-03-10 03:02:24 +01:00
|
|
|
|
def get_latest_version(opts)
|
|
|
|
|
get_npm_version('immutable', opts)
|
2019-03-09 02:36:05 +01:00
|
|
|
|
end
|
2016-11-20 15:37:27 +01:00
|
|
|
|
end
|
|
|
|
|
end
|