fix: 🐛 babel document duplicate and do not display

pull/1932/head
ChandlerVer5 2 years ago
parent b1981dd835
commit 18a84c72e9

@ -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,6 +24,10 @@ 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.

Loading…
Cancel
Save