From e8e9941095f2db296041c9bb9681c1f98085dade Mon Sep 17 00:00:00 2001 From: Drew Dara-Abrams Date: Wed, 30 Jan 2019 14:46:31 -0800 Subject: [PATCH] make sure to clear out existing files before rebuilding --- Rakefile | 5 +++++ 1 file changed, 5 insertions(+) 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}"