Skip to content

Commit

Permalink
preparing for Leaflet 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
drewda committed Nov 3, 2016
1 parent 68b25cd commit 27df7db
Show file tree
Hide file tree
Showing 33 changed files with 28,562 additions and 7,581 deletions.
13 changes: 8 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
GEM
remote: https://rubygems.org/
specs:
mini_portile (0.5.1)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
rake (10.1.0)
sqlite3 (1.3.7)
mini_portile2 (2.1.0)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
rake (11.3.0)
sqlite3 (1.3.12)

PLATFORMS
ruby
Expand All @@ -14,3 +14,6 @@ DEPENDENCIES
nokogiri
rake
sqlite3

BUNDLED WITH
1.13.1
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>isDashDocset</key>
<true/>
<key>dashIndexFilePath</key>
<string>leafletjs.com/reference.html</string>
<string>leafletjs.com/reference-1.0.0.html</string>
<key>isJavaScriptEnabled</key>
<true/>
</dict>
Expand Down
15 changes: 8 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'sqlite3'
require 'nokogiri'

DOC_URL = "http://leafletjs.com/reference.html"
DOC_URL = "http://leafletjs.com/reference-1.0.0.html"

task :default => [
:fetch_docs,
Expand All @@ -19,17 +19,18 @@ end

task :remove_annoying_parts_from_docs do
doc_to_modify = doc.clone
doc_to_modify.css('#forkme').remove
doc_to_modify.css('.social-buttons').remove
doc_to_modify.css('#uvTab').remove
doc_to_modify.css('.ext-links').remove
doc_to_modify.css('.nav').remove
doc_to_modify.css('#toc-copy').remove
doc_to_modify.xpath('//script[@src="docs/js/docs.js"]').remove # no TOC script
File.open html_file_path, 'w' do |f|
f.puts doc_to_modify.to_html
end
end

task :fetch_icon do
target_file = Dir.getwd + '/dist/leaflet.docset/icon.png'
system "wget http://leafletjs.com/docs/images/favicon.png -O #{target_file}"
system "wget http://leafletjs.com/docs/images/favicon.ico -O #{target_file}"
end

task :index do
Expand All @@ -54,7 +55,7 @@ private
end

def html_file_path
docset_contents_path + 'Resources/Documents/leafletjs.com/reference.html'
docset_contents_path + 'Resources/Documents/leafletjs.com/reference-1.0.0.html'
end

def open_html_file
Expand All @@ -75,7 +76,7 @@ private
end

def parse_doc_into_db(doc, db)
file_name = './leafletjs.com/reference.html'
file_name = './leafletjs.com/reference-1.0.0.html'
doc.css('h2').each do |heading2|
name = heading2.content
type = determine_type(heading2)
Expand Down
Binary file modified dist/Leaflet.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/leaflet.docset/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>isDashDocset</key>
<true/>
<key>dashIndexFilePath</key>
<string>leafletjs.com/reference.html</string>
<string>leafletjs.com/reference-1.0.0.html</string>
<key>isJavaScriptEnabled</key>
<true/>
</dict>
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 27df7db

Please sign in to comment.