From 4e9a5b19c603184c3340fd96d72edf44b3334bbb Mon Sep 17 00:00:00 2001 From: arngo <27396817+arngo@users.noreply.github.com> Date: Wed, 2 Feb 2022 22:17:11 -0500 Subject: get yarddoc working for mruby c functions --- Rakefile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index ec69262..6993e3b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,9 +1,20 @@ require 'yard' -task default: [:yard] +task default: [:api] +#task default: [:yard] -YARD::Rake::YardocTask.new do |t| - t.files = ['./mrblib/*', 'src/*'] - t.options = ['--output-dir', './docs', 'yardoc --markup=markdown|textile|rdoc(default)'] - t.stats_options = ['--list-undoc'] +#YARD::Rake::YardocTask.new do |t| +# t.files = ['./mrblib/*', 'src/*'] +# t.options = ['--output-dir', './docs', 'yardoc --markup=markdown|textile|rdoc(default)', '--plugin mruby'] +# t.stats_options = ['--list-undoc'] +#end +# +desc 'generate yard docs' +task :api do + begin + sh "mrbdoc" + rescue + puts "ERROR: To generate yard documentation, you should install yard-mruby gem." + puts " $ gem install yard-mruby yard-coderay" + end end -- cgit v1.2.3