Skip to content

Commit

Permalink
make sure to clear out existing files before rebuilding
Browse files Browse the repository at this point in the history
  • Loading branch information
drewda committed Jan 30, 2019
1 parent 4a5e4b3 commit e8e9941
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FILE_NAME = "reference-1.4.0.html"
DOC_URL = "http://leafletjs.com/#{FILE_NAME}"

task :default => [
:clear_existing_docs,
:fetch_docs,
:remove_annoying_parts_from_docs,
:fetch_icon,
Expand All @@ -13,6 +14,10 @@ task :default => [
:tar
]

task :clear_existing_docs do
FileUtils.rm_rf(Dir.getwd + '/dist')
end

task :fetch_docs do
target_dir = Dir.getwd + '/dist/leaflet.docset/Contents/Resources/Documents'
system "wget --convert-links --page-requisites --directory-prefix=#{target_dir} #{DOC_URL}"
Expand Down

0 comments on commit e8e9941

Please sign in to comment.