Unified · Split
| @@ -43,10 +43,11 @@ class DocsCLI < Thor · 42 unmodified lines | ||
| 43 | 43 | invalid_doc(name) |
| 44 | 44 | end |
| 45 | 45 | |
| 46 | − desc 'generate <doc> [--verbose] [--debug] [--force]', 'Generate a documentation' | |
| 46 | + desc 'generate <doc> [--verbose] [--debug] [--force] [--package]', 'Generate a documentation' | |
| 47 | 47 | option :verbose, type: :boolean |
| 48 | 48 | option :debug, type: :boolean |
| 49 | 49 | option :force, type: :boolean |
| 50 | + option :package, type: :boolean | |
| 50 | 51 | def generate(name) |
| 51 | 52 | Docs.install_report :store if options[:verbose] |
| 52 | 53 | Docs.install_report :scraper if options[:debug] |
| @@ -67,6 +68,10 @@ class DocsCLI < Thor · 14 unmodified lines | ||
| 67 | 68 | |
| 68 | 69 | if Docs.generate(name) |
| 69 | 70 | generate_manifest |
| 71 | + if options[:package] | |
| 72 | + require 'unix_utils' | |
| 73 | + package_doc(Docs.find(name)) | |
| 74 | + end | |
| 70 | 75 | puts 'Done' |
| 71 | 76 | else |
| 72 | 77 | puts "Failed!#{' (try running with --debug for more information)' unless options[:debug]}" |