forked from freeCodeCamp/devdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.rb
49 lines (40 loc) · 994 Bytes
/
babel.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
module Docs
class Babel < UrlScraper
self.type = 'simple'
self.base_url = 'https://babeljs.io/docs/'
self.links = {
home: 'https://babeljs.io/',
code: 'https://github.com/babel/babel'
}
html_filters.push 'babel/clean_html', 'babel/entries'
options[:trailing_slash] = true
options[:skip_patterns] = [
/usage/,
/configuration/,
/learn/,
/v7-migration/,
/v7-migration-api/,
/editors/,
/presets/,
/caveats/,
/faq/,
/roadmap/
]
options[:skip_link] = ->(link) {
link['href'].include?('https://babeljs.io/docs/en/')
}
options[:attribution] = <<-HTML
© 2014-present Sebastian McKenzie<br>
Licensed under the MIT License.
HTML
version '7' do
self.release = '7.21.4'
end
version '6' do
self.release = '6.26.1'
end
def get_latest_version(opts)
get_latest_github_release('babel', 'babel', opts)
end
end
end