You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
devdocs/lib/docs/scrapers/marionette.rb

47 lines
1.1 KiB

module Docs
class Marionette < UrlScraper
self.name = 'Marionette.js'
self.slug = 'marionette'
self.type = 'simple'
self.root_path = 'index'
self.links = {
home: 'https://marionettejs.com/',
code: 'https://github.com/marionettejs/backbone.marionette'
}
html_filters.push 'marionette/clean_html'
options[:container] = '.docs__content'
options[:attribution] = <<-HTML
&copy; 2017 Muted Solutions, LLC<br>
Licensed under the MIT License.
HTML
version '4' do
self.release = '4.0.0'
self.base_url = "https://marionettejs.com/docs/v#{release}/"
html_filters.push 'marionette/entries_v3'
end
version '3' do
self.release = '3.5.1'
self.base_url = "https://marionettejs.com/docs/v#{release}/"
html_filters.push 'marionette/entries_v3'
end
version '2' do
self.release = '2.4.7'
self.base_url = "https://marionettejs.com/docs/v#{release}/"
html_filters.push 'marionette/entries_v2'
end
def get_latest_version(opts)
get_npm_version('backbone.marionette', opts)
end
end
end