18
18
option '--markup FORMAT' do
19
19
summary "The markup format to use for docstring text (defaults to 'markdown')."
20
20
end
21
- option '--emit-json-stdout' do
22
- summary 'DEPRECATED: Print JSON representation of the documentation to stdout.'
23
- end
24
- option '--emit-json PATH' do
25
- summary 'DEPRECATED: Write JSON representation of the documentation to the given file.'
26
- end
27
21
28
22
summary 'Generate documentation from files.'
29
23
arguments '[[search_pattern] ...]'
@@ -157,12 +151,6 @@ def build_generate_options(options = nil, *yard_args)
157
151
generate_options [ :backtrace ] = Puppet [ :trace ]
158
152
generate_options [ :yard_args ] = yard_args unless yard_args . empty?
159
153
if options
160
- if options [ :emit_json ]
161
- warn "WARNING: '--emit-json PATH' is deprecated. Use '--format json --out PATH' instead."
162
- end
163
- if options [ :emit_json_stdout ]
164
- warn "WARNING: '--emit-json-stdout' is deprecated. Use '--format json' instead."
165
- end
166
154
markup = options [ :markup ]
167
155
generate_options [ :markup ] = markup if markup
168
156
generate_options [ :path ] = options [ :out ] if options [ :out ]
@@ -178,15 +166,11 @@ def build_generate_options(options = nil, *yard_args)
178
166
if format
179
167
if format . casecmp ( 'markdown' ) . zero?
180
168
generate_options [ :markdown ] = true
181
- elsif format . casecmp ( 'json' ) . zero? || options [ :emit_json ] || options [ :emit_json_stdout ]
169
+ elsif format . casecmp ( 'json' ) . zero?
182
170
generate_options [ :json ] = true
183
- generate_options [ :path ] ||= options [ :emit_json ] if options [ :emit_json ]
184
171
else
185
172
raise "Invalid format #{ options [ :format ] } . Please select 'json' or 'markdown'."
186
173
end
187
- elsif options [ :emit_json ] || options [ :emit_json_stdout ]
188
- generate_options [ :json ] = true
189
- generate_options [ :path ] ||= options [ :emit_json ] if options [ :emit_json ]
190
174
end
191
175
end
192
176
generate_options
0 commit comments