Merge pull request #1932 from ChandlerVer5/babel-fix

fix: 🐛 babel document duplicate and do not display
pull/1969/head
Simon Legner 2 years ago committed by GitHub
commit f2faeaffd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,13 +3,13 @@ module Docs
class EntriesFilter < Docs::EntriesFilter
ENTRIES = {
'Usage' => ['Options', 'Config Files', '@babel/cli', '@babel/polyfill',
'Usage' => ['Options', 'Plugins', 'Config Files', 'Compiler assumptions', '@babel/cli', '@babel/polyfill',
'@babel/plugin-transform-runtime', '@babel/register'],
'Presets' => ['@babel/preset-env', '@babel/preset-flow', '@babel/preset-react', '@babel/preset-typescript'],
'Presets' => ['@babel/preset'],
'Tooling' => ['@babel/parser', '@babel/core', '@babel/generator', '@babel/code-frame',
'@babel/helpers', '@babel/runtime', '@babel/template', '@babel/traverse', '@babel/types']
'@babel/helper', '@babel/runtime', '@babel/template', '@babel/traverse', '@babel/types', '@babel/standalone']
}
def get_name
@ -18,7 +18,7 @@ module Docs
def get_type
ENTRIES.each do |key, value|
return key if value.include?(name)
return key if value.any? { |val| name.start_with?(val) }
return 'Other Plugins' if subpath.include?('babel-plugin')
end
end

@ -24,13 +24,17 @@ module Docs
/roadmap/
]
options[:skip_link] = ->(link) {
link['href'].include?('https://babeljs.io/docs/en/')
}
options[:attribution] = <<-HTML
&copy; 2014-present Sebastian McKenzie<br>
Licensed under the MIT License.
HTML
version '7' do
self.release = '7.21.1'
self.release = '7.21.4'
end
version '6' do

Loading…
Cancel
Save