History

Update Sass documentation (1.55.0)

Obtain version from https://www.npmjs.com/package/sass as indicated in https://sass-lang.com/install.

Simon Legner committed 4 years ago

Commit 3b2daf11 parent c1c546e4 files · +14 −8Browse files

Unified · Split

4 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +2 −2
  2. lib/docs/filters/sass/clean_html.rb +5 −0
  3. lib/docs/filters/sass/entries.rb +3 −1
  4. lib/docs/scrapers/sass.rb +4 −5
assets/javascripts/templates/pages/about_tmpl.coffee+2−2
@@ -833,9 +833,9 @@ credits = [ · 832 unmodified lines
833 'https://raw.githubusercontent.com/sanctuary-js/sanctuary/master/LICENSE'833 'https://raw.githubusercontent.com/sanctuary-js/sanctuary/master/LICENSE'
834 ], [834 ], [
835 'Sass',835 'Sass',
836 '2006-2020 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein',836 '2022 Google Inc.',
837 'MIT',837 'MIT',
838 'https://raw.githubusercontent.com/sass/sass/stable/MIT-LICENSE'838 'https://raw.githubusercontent.com/sass/sass/main/LICENSE'
839 ], [839 ], [
840 'Scala',840 'Scala',
841 '2002-2022 EPFL, with contributions from Lightbend',841 '2002-2022 EPFL, with contributions from Lightbend',
lib/docs/filters/sass/clean_html.rb+5−0
@@ -2,6 +2,7 @@ module Docs · 1 unmodified line
2 class Sass2 class Sass
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 @doc = at_css('#main-content')
5 6
6 css('.sl-c-alert').remove7 css('.sl-c-alert').remove
7 8
@@ -11,6 +12,8 @@ module Docs · 3 unmodified lines
11 12
12 css('.site-footer').remove13 css('.site-footer').remove
13 14
15 css('.tsd-breadcrumb').remove
16
14 # Add id to code blocks17 # Add id to code blocks
15 css('pre.signature').each do |node|18 css('pre.signature').each do |node|
16 19
@@ -41,10 +44,12 @@ module Docs · 24 unmodified lines
41 ### Syntax Highlight ###44 ### Syntax Highlight ###
42 css('.highlight.scss', '.highlight.sass').each do |node|45 css('.highlight.scss', '.highlight.sass').each do |node|
43 node['data-language'] = 'scss'46 node['data-language'] = 'scss'
47 node.content = node.content.strip
44 end48 end
45 49
46 css('.highlight.css').each do |node|50 css('.highlight.css').each do |node|
47 node['data-language'] = 'css'51 node['data-language'] = 'css'
52 node.content = node.content.strip
48 end53 end
49 54
50 doc55 doc
lib/docs/filters/sass/entries.rb+3−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
3 class EntriesFilter < Docs::EntriesFilter3 class EntriesFilter < Docs::EntriesFilter
4 4
5 def get_name5 def get_name
6 at_css('#main-content > h1').content6 at_css('#main-content > h1, #main-content h1').content
7 end7 end
8 8
9 def get_type9 def get_type
@@ -23,6 +23,8 @@ module Docs · 13 unmodified lines
23 'Command line'23 'Command line'
24 when /modules/24 when /modules/
25 'Modules'25 'Modules'
26 when /js-api/
27 'JavaScript API'
26 else28 else
27 'Misc'29 'Misc'
28 end30 end
lib/docs/scrapers/sass.rb+4−5
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Sass < UrlScraper2 class Sass < UrlScraper
3 self.type = 'yard'3 self.type = 'yard'
4 self.release = '3.6.4'4 self.release = '1.55.0'
5 self.base_url = 'https://sass-lang.com/documentation'5 self.base_url = 'https://sass-lang.com/documentation'
6 self.root_path = 'index.html'6 self.root_path = 'index.html'
7 self.links = {7 self.links = {
@@ -9,22 +9,21 @@ module Docs · 1 unmodified line
9 code: 'https://github.com/sass/sass'9 code: 'https://github.com/sass/sass'
10 }10 }
11 11
12 html_filters.push 'sass/clean_html', 'sass/entries', 'title'12 html_filters.push 'sass/entries', 'sass/clean_html'
13 13
14 options[:root_title] = false14 options[:root_title] = false
15 options[:title] = 'Sass Functions'
16 15
17 options[:skip_patterns] = [/breaking-changes/]16 options[:skip_patterns] = [/breaking-changes/]
18 17
19 # options[:container] = '#main-content'18 # options[:container] = '#main-content'
20 19
21 options[:attribution] = <<-HTML20 options[:attribution] = <<-HTML
22 &copy; 2006&ndash;2020 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein<br>21 &copy; 2006&ndash;2022 the Sass team, and numerous contributors<br>
23 Licensed under the MIT License.22 Licensed under the MIT License.
24 HTML23 HTML
25 24
26 def get_latest_version(opts)25 def get_latest_version(opts)
27 get_latest_github_release('sass', 'libsass', opts)26 get_npm_version('sass', opts)
28 end27 end
29 28
30 end29 end