History

Add docs:clean task for deleting documentation packages

Thibaut committed 13 years ago

Commit fcaf9871 parent 0d7c1742 files · +7 −0Browse files

Unified · Split

2 files
  1. README.md +1 −0
  2. lib/tasks/docs.thor +6 −0
README.md+1−0
@@ -102,6 +102,7 @@ thor docs:manifest # Create the manifest file used by the app · 101 unmodified lines
102102 thor docs:generate # Generate/scrape a documentation
103103 thor docs:page # Generate/scrape a documentation page
104104 thor docs:package # Package a documentation for use with docs:download
105+thor docs:clean # Delete documentation packages
105106
106107 # Console
107108 thor console # Start a REPL
lib/tasks/docs.thor+6−0
@@ -106,6 +106,12 @@ class DocsCLI < Thor · 105 unmodified lines
106106 invalid_doc(error.name)
107107 end
108108
109+ desc 'clean', 'Delete documentation packages'
110+ def clean
111+ File.delete(*Dir[File.join Docs.store_path, '*.tar.gz'])
112+ puts 'Done'
113+ end
114+
109115 private
110116
111117 def find_docs(names)