|
|
|
@ -2,22 +2,40 @@ module Docs
|
|
|
|
|
class Deno < UrlScraper
|
|
|
|
|
self.name = 'Deno'
|
|
|
|
|
self.type = 'simple'
|
|
|
|
|
self.release = '1.27.0'
|
|
|
|
|
self.base_url = 'https://doc.deno.land/deno/stable/'
|
|
|
|
|
self.links = {
|
|
|
|
|
home: 'https://deno.land/',
|
|
|
|
|
home: 'https://deno.com/',
|
|
|
|
|
code: 'https://github.com/denoland/deno'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
html_filters.push 'deno/entries', 'deno/clean_html'
|
|
|
|
|
|
|
|
|
|
# https://github.com/denoland/manual/blob/main/LICENSE
|
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
|
|
© 2018–2022 the Deno authors
|
|
|
|
|
© 2018–2024 the Deno authors<br>
|
|
|
|
|
Licensed under the MIT License.
|
|
|
|
|
HTML
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
html_filters.push 'deno/entries', 'deno/clean_html'
|
|
|
|
|
|
|
|
|
|
version '2' do
|
|
|
|
|
self.release = '2.1.1'
|
|
|
|
|
self.base_url = 'https://docs.deno.com/'
|
|
|
|
|
self.root_path = 'runtime'
|
|
|
|
|
options[:only_patterns] = [/\Aruntime/, /\Aapi\/deno\/~/, /\Adeploy/, /\Asubhosting/]
|
|
|
|
|
options[:skip_patterns] = [
|
|
|
|
|
/\Aruntime\/manual/,
|
|
|
|
|
/\Aapi\/deno\/.+\.prototype\z/, # all prototype pages get redirected to the main page
|
|
|
|
|
/\Aapi\/deno\/~\/Deno\.jupyter\.MediaBundle.+/, # docs unavailable
|
|
|
|
|
/\Aapi\/deno\/~\/Deno\.OpMetrics/, # deprecated in deno 2
|
|
|
|
|
]
|
|
|
|
|
options[:trailing_slash] = false
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
version '1' do
|
|
|
|
|
self.release = '1.27.0'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def get_latest_version(opts)
|
|
|
|
|
get_latest_github_release('denoland', 'deno', opts)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|