History

Merge pull request #1804 from freeCodeCamp/axios

Add Axios documentation (0.27.2)

Simon Legner committed 4 years ago

Commit ccce5e82 parents 0ed83b2 03e42df8 files · +54 −-1Browse files

Unified · Split

8 files
  1. assets/javascripts/news.json +1 −1
  2. assets/javascripts/templates/pages/about_tmpl.coffee +5 −0
  3. lib/docs/filters/axios/clean_html.rb +10 −0
  4. lib/docs/filters/axios/entries.rb +13 −0
  5. lib/docs/scrapers/axios.rb +26 −0
  6. public/icons/docs/axios/16.png +0 −0
  7. public/icons/docs/axios/16@2x.png +0 −0
  8. public/icons/docs/axios/SOURCE +1 −0
assets/javascripts/news.json+1−1
@@ -1,7 +1,7 @@
1[1[
2 [2 [
3 "2022-08-27",3 "2022-08-27",
4 "New documentations: <a href=\"/sanctuary/\">Sanctuary</a>, <a href=\"/requests/\">Requests</a>"4 "New documentations: <a href=\"/sanctuary/\">Sanctuary</a>, <a href=\"/requests/\">Requests</a>, <a href=\"/axios/\">Axios</a>"
5 ],5 ],
6 [6 [
7 "2022-05-03",7 "2022-05-03",
assets/javascripts/templates/pages/about_tmpl.coffee+5−0
@@ -106,6 +106,11 @@ credits = [ · 105 unmodified lines
106 '2010-2018 Caolan McMahon',106 '2010-2018 Caolan McMahon',
107 'MIT',107 'MIT',
108 'https://raw.githubusercontent.com/caolan/async/master/LICENSE'108 'https://raw.githubusercontent.com/caolan/async/master/LICENSE'
109 ], [
110 'Axios',
111 '2014-present Matt Zabriskie',
112 'MIT',
113 'https://raw.githubusercontent.com/axios/axios/main/LICENSE'
109 ], [114 ], [
110 'Babel',115 'Babel',
111 '2014-present Sebastian McKenzie',116 '2014-present Sebastian McKenzie',
lib/docs/filters/axios/clean_html.rb+10−0
@@ -0,0 +1,10 @@
1module Docs
2 class Axios
3 class CleanHtmlFilter < Filter
4 def call
5 css('.links').remove
6 doc
7 end
8 end
9 end
10end
lib/docs/filters/axios/entries.rb+13−0
@@ -0,0 +1,13 @@
1module Docs
2 class Axios
3 class EntriesFilter < Docs::EntriesFilter
4 def get_name
5 at_css('h1').content
6 end
7
8 def get_type
9 'axios'
10 end
11 end
12 end
13end
lib/docs/scrapers/axios.rb+26−0
@@ -0,0 +1,26 @@
1module Docs
2 class Axios < UrlScraper
3 self.type = 'simple'
4 self.links = {
5 home: 'hthttps://axios-http.com/',
6 code: 'https://github.com/axios/axios'
7 }
8 self.release = '0.27.2'
9 self.base_url = "https://axios-http.com/docs/"
10 self.initial_paths = %w(intro)
11
12 html_filters.push 'axios/entries', 'axios/clean_html'
13
14 options[:container] = 'main > .body'
15
16 # https://github.com/axios/axios-docs/blob/master/LICENSE
17 options[:attribution] = <<-HTML
18 &copy; 2020-present John Jakob "Jake" Sarjeant<br>
19 Licensed under the MIT License.
20 HTML
21
22 def get_latest_version(opts)
23 get_latest_github_release('axios', 'axios', opts)
24 end
25 end
26end
public/icons/docs/axios/16.png+0−0

Binary file not shown.

public/icons/docs/axios/16@2x.png+0−0

Binary file not shown.

public/icons/docs/axios/SOURCE+1−0
@@ -0,0 +1 @@
1https://raw.githubusercontent.com/axios/axios-docs/master/assets/favicon.png