mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Adjust docs:page
version handling
- Remove `--version` option - Add `@|~` version notation, consistent with other commands
This commit is contained in:
parent
26a1e61a42
commit
21827a6b69
1 changed files with 3 additions and 3 deletions
|
@ -40,8 +40,7 @@ class DocsCLI < Thor
|
|||
TTY::Pager.new.page(output)
|
||||
end
|
||||
|
||||
desc 'page <doc> [path] [--version] [--verbose] [--debug]', 'Generate a page (no indexing)'
|
||||
option :version, type: :string
|
||||
desc 'page (<doc> | <doc@version>) [path] [--verbose] [--debug]', 'Generate a page (no indexing)'
|
||||
option :verbose, type: :boolean
|
||||
option :debug, type: :boolean
|
||||
def page(name, path = '')
|
||||
|
@ -56,7 +55,8 @@ class DocsCLI < Thor
|
|||
Docs.install_report :filter, :request, :doc
|
||||
end
|
||||
|
||||
if Docs.generate_page(name, options[:version], path)
|
||||
name, version = name.split(/@|~/)
|
||||
if Docs.generate_page(name, version, path)
|
||||
puts 'Done'
|
||||
else
|
||||
puts "Failed!#{' (try running with --debug for more information)' unless options[:debug]}"
|
||||
|
|
Loading…
Reference in a new issue