Update Sass documentation (1.55.0)

Obtain version from https://www.npmjs.com/package/sass as indicated in
https://sass-lang.com/install.
pull/1851/head
Simon Legner 2 years ago
parent c1c546e72b
commit 3b2daf1e6d

@ -833,9 +833,9 @@ credits = [
'https://raw.githubusercontent.com/sanctuary-js/sanctuary/master/LICENSE' 'https://raw.githubusercontent.com/sanctuary-js/sanctuary/master/LICENSE'
], [ ], [
'Sass', 'Sass',
'2006-2020 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein', '2022 Google Inc.',
'MIT', 'MIT',
'https://raw.githubusercontent.com/sass/sass/stable/MIT-LICENSE' 'https://raw.githubusercontent.com/sass/sass/main/LICENSE'
], [ ], [
'Scala', 'Scala',
'2002-2022 EPFL, with contributions from Lightbend', '2002-2022 EPFL, with contributions from Lightbend',

@ -2,6 +2,7 @@ module Docs
class Sass class Sass
class CleanHtmlFilter < Filter class CleanHtmlFilter < Filter
def call def call
@doc = at_css('#main-content')
css('.sl-c-alert').remove css('.sl-c-alert').remove
@ -11,6 +12,8 @@ module Docs
css('.site-footer').remove css('.site-footer').remove
css('.tsd-breadcrumb').remove
# Add id to code blocks # Add id to code blocks
css('pre.signature').each do |node| css('pre.signature').each do |node|
@ -41,10 +44,12 @@ module Docs
### Syntax Highlight ### ### Syntax Highlight ###
css('.highlight.scss', '.highlight.sass').each do |node| css('.highlight.scss', '.highlight.sass').each do |node|
node['data-language'] = 'scss' node['data-language'] = 'scss'
node.content = node.content.strip
end end
css('.highlight.css').each do |node| css('.highlight.css').each do |node|
node['data-language'] = 'css' node['data-language'] = 'css'
node.content = node.content.strip
end end
doc doc

@ -3,7 +3,7 @@ module Docs
class EntriesFilter < Docs::EntriesFilter class EntriesFilter < Docs::EntriesFilter
def get_name def get_name
at_css('#main-content > h1').content at_css('#main-content > h1, #main-content h1').content
end end
def get_type def get_type
@ -23,6 +23,8 @@ module Docs
'Command line' 'Command line'
when /modules/ when /modules/
'Modules' 'Modules'
when /js-api/
'JavaScript API'
else else
'Misc' 'Misc'
end end

@ -1,7 +1,7 @@
module Docs module Docs
class Sass < UrlScraper class Sass < UrlScraper
self.type = 'yard' self.type = 'yard'
self.release = '3.6.4' self.release = '1.55.0'
self.base_url = 'https://sass-lang.com/documentation' self.base_url = 'https://sass-lang.com/documentation'
self.root_path = 'index.html' self.root_path = 'index.html'
self.links = { self.links = {
@ -9,22 +9,21 @@ module Docs
code: 'https://github.com/sass/sass' code: 'https://github.com/sass/sass'
} }
html_filters.push 'sass/clean_html', 'sass/entries', 'title' html_filters.push 'sass/entries', 'sass/clean_html'
options[:root_title] = false options[:root_title] = false
options[:title] = 'Sass Functions'
options[:skip_patterns] = [/breaking-changes/] options[:skip_patterns] = [/breaking-changes/]
# options[:container] = '#main-content' # options[:container] = '#main-content'
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2006&ndash;2020 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein<br> &copy; 2006&ndash;2022 the Sass team, and numerous contributors<br>
Licensed under the MIT License. Licensed under the MIT License.
HTML HTML
def get_latest_version(opts) def get_latest_version(opts)
get_latest_github_release('sass', 'libsass', opts) get_npm_version('sass', opts)
end end
end end

Loading…
Cancel
Save