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
102thor docs:generate # Generate/scrape a documentation102thor docs:generate # Generate/scrape a documentation
103thor docs:page # Generate/scrape a documentation page103thor docs:page # Generate/scrape a documentation page
104thor docs:package # Package a documentation for use with docs:download104thor docs:package # Package a documentation for use with docs:download
105thor docs:clean # Delete documentation packages
105 106
106# Console107# Console
107thor console # Start a REPL108thor console # Start a REPL
lib/tasks/docs.thor+6−0
@@ -106,6 +106,12 @@ class DocsCLI < Thor · 105 unmodified lines
106 invalid_doc(error.name)106 invalid_doc(error.name)
107 end107 end
108 108
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
109 private115 private
110 116
111 def find_docs(names)117 def find_docs(names)