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.
|
|
|
module Docs
|
|
|
|
class Npm < UrlScraper
|
|
|
|
self.name = 'npm'
|
|
|
|
self.type = 'npm'
|
|
|
|
self.release = '5.0.2'
|
|
|
|
self.base_url = 'https://docs.npmjs.com/'
|
|
|
|
self.force_gzip = true
|
|
|
|
self.links = {
|
|
|
|
home: 'https://www.npmjs.com/',
|
|
|
|
code: 'https://github.com/npm/npm'
|
|
|
|
}
|
|
|
|
|
|
|
|
html_filters.push 'npm/entries', 'npm/clean_html', 'title'
|
|
|
|
|
|
|
|
options[:container] = ->(filter) { filter.root_page? ? '.toc' : nil }
|
|
|
|
options[:title] = false
|
|
|
|
options[:root_title] = 'npm'
|
|
|
|
|
|
|
|
options[:skip] = %w(all misc/index)
|
|
|
|
options[:skip_patterns] = [
|
|
|
|
/\Aenterprise/,
|
|
|
|
/\Acompany/,
|
|
|
|
/\Apolicies/
|
|
|
|
]
|
|
|
|
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
|
© npm, Inc. and Contributors<br>
|
|
|
|
Licensed under the npm License.<br>
|
|
|
|
npm is a trademark of npm, Inc.
|
|
|
|
HTML
|
|
|
|
end
|
|
|
|
end
|