mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
969 B
35 lines
969 B
7 years ago
|
module Docs
|
||
|
class Dart < FileScraper
|
||
|
self.type = 'dart'
|
||
|
self.root_path = 'index.html'
|
||
|
self.links = {
|
||
|
home: 'https://www.dartlang.org/',
|
||
|
code: 'https://github.com/dart-lang/sdk'
|
||
|
}
|
||
|
|
||
|
html_filters.push 'dart/entries', 'dart/clean_html'
|
||
|
|
||
|
options[:fix_urls] = ->(url) do
|
||
|
# localhost/dart-web_audio/..dart-io/dart-io-library.html > localhost/dart-io/dart-io-library.html
|
||
|
url.sub(/(([^\/]+)\/\.\.)/, '')
|
||
|
end
|
||
|
|
||
|
options[:attribution] = <<-HTML
|
||
|
© 2012, the Dart project authors<br>
|
||
|
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
|
||
|
HTML
|
||
|
|
||
|
# Download the documentation from https://www.dartlang.org/tools/sdk/archive
|
||
|
|
||
|
version '1' do
|
||
|
self.release = '1.24.3'
|
||
|
self.dir = '/home/jasper/Documents/dart-docs-1.24.3'
|
||
|
end
|
||
|
|
||
|
version '2' do
|
||
|
self.release = '2.0.0-dev.68.0'
|
||
|
self.dir = '/home/jasper/Documents/dart-docs-2.0.0-dev.68.0'
|
||
|
end
|
||
|
end
|
||
|
end
|