Ver Fonte

Update Dart version 2 to 2.10.4

MasterEnoc há 5 anos atrás
pai
commit
507990e4c6
2 ficheiros alterados com 9 adições e 2 exclusões
  1. 6 0
      docs/file-scrapers.md
  2. 3 2
      lib/docs/scrapers/dart.rb

+ 6 - 0
docs/file-scrapers.md

@@ -20,6 +20,12 @@ Click the “API docs” link under the “Stable channel” header on
 https://www.dartlang.org/tools/sdk/archive. Rename the expanded ZIP to `dart~2`
 and put it in `/path/to/devdocs/docs/`
 
+Or run the following commands in your terminal:
+
+```sh
+curl https://storage.googleapis.com/dart-archive/channels/stable/release/$RELEASE/api-docs/dartdocs-gen-api-zip > dartApi.zip; \
+unzip dartApi.zip; mv gen-dartdocs docs/dart~$VERSION
+```
 ## Django
 
 Go to https://docs.djangoproject.com/, select the version from the

+ 3 - 2
lib/docs/scrapers/dart.rb

@@ -21,7 +21,7 @@ module Docs
     HTML
 
     version '2' do
-      self.release = '2.5.0'
+      self.release = '2.10.4'
       self.base_url = "https://api.dart.dev/stable/#{release}/"
     end
 
@@ -31,9 +31,10 @@ module Docs
     end
 
     def get_latest_version(opts)
-      doc = fetch_doc('https://api.dartlang.org/', opts)
+      doc = fetch_doc('https://api.dart.dev/', opts)
       label = doc.at_css('footer > span').content.strip
       label.sub(/Dart\s*/, '')
     end
+
   end
 end