Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | [ |
| 2 | 2 | [ |
| 3 | 3 | "2017-05-14", |
| 4 | − "New documentation: <a href=\"/liquid/\">Liquid</a>" | |
| 4 | + "New documentations: <a href=\"/jest/\">Jest</a> and <a href=\"/liquid/\">Liquid</a>" | |
| 5 | 5 | ], [ |
| 6 | 6 | "2017-04-30", |
| 7 | 7 | "New documentation: <a href=\"/openjdk/\">OpenJDK</a>" |
| @@ -283,6 +283,11 @@ credits = [ · 282 unmodified lines | ||
| 283 | 283 | '2015 InfluxData, Inc.', |
| 284 | 284 | 'MIT', |
| 285 | 285 | 'https://github.com/influxdata/docs.influxdata.com/blob/master/LICENSE' |
| 286 | + ], [ | |
| 287 | + 'Jest', | |
| 288 | + '2014-present Facebook Inc.', | |
| 289 | + 'BSD', | |
| 290 | + 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE' | |
| 286 | 291 | ], [ |
| 287 | 292 | 'jQuery', |
| 288 | 293 | 'Packt Publishing<br>© jQuery Foundation and other contributors', |
| @@ -28,6 +28,7 @@ app.views.ExpressPage = · 27 unmodified lines | ||
| 28 | 28 | app.views.GoPage = |
| 29 | 29 | app.views.ImmutablePage = |
| 30 | 30 | app.views.InfluxdataPage = |
| 31 | +app.views.JestPage = | |
| 31 | 32 | app.views.KnockoutPage = |
| 32 | 33 | app.views.KotlinPage = |
| 33 | 34 | app.views.LaravelPage = |
| @@ -43,6 +43,7 @@ · 42 unmodified lines | ||
| 43 | 43 | %icon-clipboard-white { background-position: -1rem -2rem; } |
| 44 | 44 | %icon-close-white { background-position: -2rem -2rem; } |
| 45 | 45 | |
| 46 | +._icon-jest:before { background-position: 0 0; } | |
| 46 | 47 | ._icon-liquid:before { background-position: -1rem 0; } |
| 47 | 48 | ._icon-openjdk:before { background-position: -2rem 0; } |
| 48 | 49 | ._icon-codeceptjs:before { background-position: -3rem 0; } |
| @@ -28,6 +28,7 @@ · 27 unmodified lines | ||
| 28 | 28 | ._haxe, |
| 29 | 29 | ._immutable, |
| 30 | 30 | ._influxdata, |
| 31 | +._jest, | |
| 31 | 32 | ._less, |
| 32 | 33 | ._lodash, |
| 33 | 34 | ._marionette, |
| @@ -0,0 +1,29 @@ | ||
| 1 | +module Docs | |
| 2 | + class Jest | |
| 3 | + class CleanHtmlFilter < Filter | |
| 4 | + def call | |
| 5 | + @doc = at_css('.mainContainer .post') | |
| 6 | + | |
| 7 | + at_css('h1').content = 'Jest' if root_page? | |
| 8 | + | |
| 9 | + css('.edit-page-link', '.hash-link', 'hr').remove | |
| 10 | + | |
| 11 | + css('.postHeader', 'article', 'div:not([class])').each do |node| | |
| 12 | + node.before(node.children).remove | |
| 13 | + end | |
| 14 | + | |
| 15 | + css('.anchor[name]').each do |node| | |
| 16 | + node.parent['id'] = node['name'] | |
| 17 | + node.remove | |
| 18 | + end | |
| 19 | + | |
| 20 | + css('pre').each do |node| | |
| 21 | + node['data-language'] = node['class'][/language-(\w+)/, 1] | |
| 22 | + node.content = node.content | |
| 23 | + end | |
| 24 | + | |
| 25 | + doc | |
| 26 | + end | |
| 27 | + end | |
| 28 | + end | |
| 29 | +end | |
| @@ -0,0 +1,35 @@ | ||
| 1 | +module Docs | |
| 2 | + class Jest | |
| 3 | + class EntriesFilter < Docs::EntriesFilter | |
| 4 | + def get_name | |
| 5 | + at_css('.mainContainer h1').content | |
| 6 | + end | |
| 7 | + | |
| 8 | + def get_type | |
| 9 | + type = at_css('.navItemActive').ancestors('.navGroup').first.at_css('h3').content | |
| 10 | + | |
| 11 | + if type == 'Introduction' | |
| 12 | + 'Guides: Introduction' | |
| 13 | + elsif type == 'API Reference' | |
| 14 | + self.name | |
| 15 | + else | |
| 16 | + type | |
| 17 | + end | |
| 18 | + end | |
| 19 | + | |
| 20 | + def additional_entries | |
| 21 | + return [] unless !root_page? && self.type == self.name # api page | |
| 22 | + | |
| 23 | + at_css('.mainContainer ul').css('li > a').map do |node| | |
| 24 | + name = node.at_css('code').content.strip | |
| 25 | + name.sub! %r{\(.*\)}, '()' | |
| 26 | + name.remove! %r{[\s=<].*} | |
| 27 | + name.prepend 'jest ' if name.start_with?('--') | |
| 28 | + name.prepend 'Config: ' if slug == 'configuration' | |
| 29 | + id = node['href'].remove('#') | |
| 30 | + [name, id] | |
| 31 | + end | |
| 32 | + end | |
| 33 | + end | |
| 34 | + end | |
| 35 | +end | |
| @@ -0,0 +1,21 @@ | ||
| 1 | +module Docs | |
| 2 | + class Jest < UrlScraper | |
| 3 | + self.type = 'jest' | |
| 4 | + self.release = '20.0.1' | |
| 5 | + self.base_url = 'https://facebook.github.io/jest/docs/en/' | |
| 6 | + self.root_path = 'getting-started.html' | |
| 7 | + self.links = { | |
| 8 | + home: 'https://facebook.github.io/jest/', | |
| 9 | + code: 'https://github.com/facebook/jest' | |
| 10 | + } | |
| 11 | + | |
| 12 | + html_filters.push 'jest/entries', 'jest/clean_html' | |
| 13 | + | |
| 14 | + options[:container] = '.docMainWrapper' | |
| 15 | + | |
| 16 | + options[:attribution] = <<-HTML | |
| 17 | + © 2014–present Facebook Inc.<br> | |
| 18 | + Licensed under the BSD License. | |
| 19 | + HTML | |
| 20 | + end | |
| 21 | +end | |
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | ||
| 1 | +https://github.com/facebook/jest/tree/master/website/src/jest/img | |