diff --git a/Rakefile b/Rakefile index 71f8643..be66bf1 100644 --- a/Rakefile +++ b/Rakefile @@ -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, @@ -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}"