Merge pull request #1862 from freeCodeCamp/vueuse

Add VueUse documentation (9.4.0)
pull/1858/merge
Simon Legner 2 years ago committed by GitHub
commit 1a22ee32df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,8 @@
[ [
[
"2022-11-04",
"New documentation: <a href=\"/vueuse/\">VueUse</a>"
],
[ [
"2022-10-10", "2022-10-10",
"New documentation: <a href=\"/astro/\">Astro</a>" "New documentation: <a href=\"/astro/\">Astro</a>"

@ -955,6 +955,11 @@ credits = [
'2013-present Yuxi Evan You', '2013-present Yuxi Evan You',
'MIT', 'MIT',
'https://raw.githubusercontent.com/vuejs/vuejs.org/master/LICENSE' 'https://raw.githubusercontent.com/vuejs/vuejs.org/master/LICENSE'
], [
'Vueuse',
'2019-present Anthony Fu',
'MIT',
'https://raw.githubusercontent.com/vueuse/vueuse/main/LICENSE'
], [ ], [
'Vuex', 'Vuex',
'2015-present Evan You', '2015-present Evan You',

@ -3,6 +3,7 @@ module Docs
class CleanHtmlFilter < Filter class CleanHtmlFilter < Filter
def call def call
return "<h1>Vitest</h1><p>A Vite-native unit test framework. It's fast!</p>" if root_page? && current_url.host == 'vitest.dev' return "<h1>Vitest</h1><p>A Vite-native unit test framework. It's fast!</p>" if root_page? && current_url.host == 'vitest.dev'
return "<h1>VueUse</h1><p>Collection of Vue Composition Utilities</p>" if root_page? && current_url.host == 'vueuse.org'
return '<h1>Vite</h1>' if root_page? return '<h1>Vite</h1>' if root_page?
@doc = at_css('main h1').parent @doc = at_css('main h1').parent

@ -0,0 +1,28 @@
module Docs
class Vueuse
class CleanHtmlFilter < Filter
def call
css('#demo, #contributors ~ div, #contributors, #changelog ~ div, #changelog').remove
css('.grid').each do |table|
table.name = 'table'
tr = nil
table.children.each do |td|
if td['opacity']
table.add_child('<tr>')
tr = table.last_element_child
td.name = 'th'
td.remove_attribute('opacity')
tr.add_child(td.remove)
else
td.name = 'td'
tr.add_child(td.remove)
end
end
end
doc
end
end
end
end

@ -0,0 +1,18 @@
module Docs
class Vueuse
class EntriesFilter < Docs::EntriesFilter
def get_name
name = at_css('h1').content
name.sub! %r{\s*#\s*}, ''
name
end
def get_type
return 'Guide' if slug == 'export-size'
return 'Guide' if slug == 'functions'
link = at_css('aside .link.active')
link.ancestors('section').at_css('.title').content
end
end
end
end

@ -0,0 +1,32 @@
module Docs
class Vueuse < UrlScraper
self.name = 'VueUse'
self.slug = 'vueuse'
self.type = 'vueuse'
self.links = {
home: 'https://vueuse.org/',
code: 'https://github.com/vueuse/vueuse'
}
options[:skip] = %w(add-ons contributing ecosystem)
options[:skip_patterns] = [/index$/]
options[:fix_urls] = ->(url) do
url.sub! 'vueuse.org/use', 'vueuse.org/core/use'
url
end
options[:attribution] = <<-HTML
&copy; 2019-present Anthony Fu<br>
Licensed under the MIT License.
HTML
self.release = '9.4.0'
self.base_url = 'https://vueuse.org/'
self.initial_paths = %w(functions.html)
html_filters.push 'vueuse/entries', 'vite/clean_html', 'vueuse/clean_html'
def get_latest_version(opts)
get_npm_version('vueuse', opts)
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

@ -0,0 +1,2 @@
https://github.com/vueuse/vueuse/blob/main/packages/public/favicon-16x16.png
https://github.com/vueuse/vueuse/blob/main/packages/public/favicon-32x32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Loading…
Cancel
Save