Add VueUse documentation (9.4.0)
Unified · Split
| @@ -1,4 +1,8 @@ | |||
| 1 | [ | 1 | [ |
| 2 | [ | ||
| 3 | "2022-11-04", | ||
| 4 | "New documentation: <a href=\"/vueuse/\">VueUse</a>" | ||
| 5 | ], | ||
| 2 | [ | 6 | [ |
| 3 | "2022-10-10", | 7 | "2022-10-10", |
| 4 | "New documentation: <a href=\"/astro/\">Astro</a>" | 8 | "New documentation: <a href=\"/astro/\">Astro</a>" |
| @@ -955,6 +955,11 @@ credits = [ · 954 unmodified lines | |||
| 955 | '2013-present Yuxi Evan You', | 955 | '2013-present Yuxi Evan You', |
| 956 | 'MIT', | 956 | 'MIT', |
| 957 | 'https://raw.githubusercontent.com/vuejs/vuejs.org/master/LICENSE' | 957 | 'https://raw.githubusercontent.com/vuejs/vuejs.org/master/LICENSE' |
| 958 | ], [ | ||
| 959 | 'Vueuse', | ||
| 960 | '2019-present Anthony Fu', | ||
| 961 | 'MIT', | ||
| 962 | 'https://raw.githubusercontent.com/vueuse/vueuse/main/LICENSE' | ||
| 958 | ], [ | 963 | ], [ |
| 959 | 'Vuex', | 964 | 'Vuex', |
| 960 | '2015-present Evan You', | 965 | '2015-present Evan You', |
| @@ -3,6 +3,7 @@ module Docs · 2 unmodified lines | |||
| 3 | class CleanHtmlFilter < Filter | 3 | class CleanHtmlFilter < Filter |
| 4 | def call | 4 | def call |
| 5 | return "<h1>Vitest</h1><p>A Vite-native unit test framework. It's fast!</p>" if root_page? && current_url.host == 'vitest.dev' | 5 | return "<h1>Vitest</h1><p>A Vite-native unit test framework. It's fast!</p>" if root_page? && current_url.host == 'vitest.dev' |
| 6 | return "<h1>VueUse</h1><p>Collection of Vue Composition Utilities</p>" if root_page? && current_url.host == 'vueuse.org' | ||
| 6 | return '<h1>Vite</h1>' if root_page? | 7 | return '<h1>Vite</h1>' if root_page? |
| 7 | @doc = at_css('main h1').parent | 8 | @doc = at_css('main h1').parent |
| 8 | 9 | ||
| @@ -0,0 +1,28 @@ | |||
| 1 | module Docs | ||
| 2 | class Vueuse | ||
| 3 | class CleanHtmlFilter < Filter | ||
| 4 | def call | ||
| 5 | css('#demo, #contributors ~ div, #contributors, #changelog ~ div, #changelog').remove | ||
| 6 | |||
| 7 | css('.grid').each do |table| | ||
| 8 | table.name = 'table' | ||
| 9 | tr = nil | ||
| 10 | table.children.each do |td| | ||
| 11 | if td['opacity'] | ||
| 12 | table.add_child('<tr>') | ||
| 13 | tr = table.last_element_child | ||
| 14 | td.name = 'th' | ||
| 15 | td.remove_attribute('opacity') | ||
| 16 | tr.add_child(td.remove) | ||
| 17 | else | ||
| 18 | td.name = 'td' | ||
| 19 | tr.add_child(td.remove) | ||
| 20 | end | ||
| 21 | end | ||
| 22 | end | ||
| 23 | |||
| 24 | doc | ||
| 25 | end | ||
| 26 | end | ||
| 27 | end | ||
| 28 | end | ||
| @@ -0,0 +1,18 @@ | |||
| 1 | module Docs | ||
| 2 | class Vueuse | ||
| 3 | class EntriesFilter < Docs::EntriesFilter | ||
| 4 | def get_name | ||
| 5 | name = at_css('h1').content | ||
| 6 | name.sub! %r{\s*#\s*}, '' | ||
| 7 | name | ||
| 8 | end | ||
| 9 | |||
| 10 | def get_type | ||
| 11 | return 'Guide' if slug == 'export-size' | ||
| 12 | return 'Guide' if slug == 'functions' | ||
| 13 | link = at_css('aside .link.active') | ||
| 14 | link.ancestors('section').at_css('.title').content | ||
| 15 | end | ||
| 16 | end | ||
| 17 | end | ||
| 18 | end | ||
| @@ -0,0 +1,32 @@ | |||
| 1 | module Docs | ||
| 2 | class Vueuse < UrlScraper | ||
| 3 | self.name = 'VueUse' | ||
| 4 | self.slug = 'vueuse' | ||
| 5 | self.type = 'vueuse' | ||
| 6 | self.links = { | ||
| 7 | home: 'https://vueuse.org/', | ||
| 8 | code: 'https://github.com/vueuse/vueuse' | ||
| 9 | } | ||
| 10 | |||
| 11 | options[:skip] = %w(add-ons contributing ecosystem) | ||
| 12 | options[:skip_patterns] = [/index$/] | ||
| 13 | options[:fix_urls] = ->(url) do | ||
| 14 | url.sub! 'vueuse.org/use', 'vueuse.org/core/use' | ||
| 15 | url | ||
| 16 | end | ||
| 17 | |||
| 18 | options[:attribution] = <<-HTML | ||
| 19 | © 2019-present Anthony Fu<br> | ||
| 20 | Licensed under the MIT License. | ||
| 21 | HTML | ||
| 22 | |||
| 23 | self.release = '9.4.0' | ||
| 24 | self.base_url = 'https://vueuse.org/' | ||
| 25 | self.initial_paths = %w(functions.html) | ||
| 26 | html_filters.push 'vueuse/entries', 'vite/clean_html', 'vueuse/clean_html' | ||
| 27 | |||
| 28 | def get_latest_version(opts) | ||
| 29 | get_npm_version('vueuse', opts) | ||
| 30 | end | ||
| 31 | end | ||
| 32 | end | ||
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1,2 @@ | |||
| 1 | https://github.com/vueuse/vueuse/blob/main/packages/public/favicon-16x16.png | ||
| 2 | https://github.com/vueuse/vueuse/blob/main/packages/public/favicon-32x32.png | ||
Binary file not shown.