devdocs/lib/docs/scrapers/svelte.rb

40 lines
865 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 Svelte < UrlScraper
self.name = 'Svelte'
self.slug = 'svelte'
self.type = 'simple'
self.root_path = '/'
self.links = {
home: 'https://svelte.dev/',
code: 'https://github.com/sveltejs/svelte'
}
options[:root_title] = 'Svelte'
# https://github.com/sveltejs/svelte/blob/master/LICENSE.md
options[:attribution] = <<-HTML
&copy; 20162024 Rich Harris and contributors<br>
Licensed under the MIT License.
HTML
self.base_url = 'https://svelte.dev/docs/svelte/'
html_filters.push 'svelte/entries', 'svelte/clean_html'
version do
self.release = '5.2.3'
end
version '4' do
self.release = '4.2.1'
end
version '3' do
self.release = '3.55.0'
end
def get_latest_version(opts)
get_npm_version('svelte', opts)
end
end
end