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 --- .yardoc/checksums | 4 ++-- .yardoc/object_types | Bin 775 -> 2854 bytes .yardoc/objects/root.dat | Bin 11366 -> 47132 bytes .yardopts | 10 ++++++++++ Gemfile | 2 -- Rakefile | 21 ++++++++++++++++----- 6 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 .yardopts diff --git a/.yardoc/checksums b/.yardoc/checksums index 36f29c4..7eafeb7 100644 --- a/.yardoc/checksums +++ b/.yardoc/checksums @@ -1,2 +1,2 @@ -mrblib/raylib.rb ce42382655c9ad1b0aa789cfb6d45d08be4eaf94 -src/raylib.c 36377aaeec5ca596a4d3493599dba11d45dfe2e3 +src/raylib.c a6e9472ccd723550bb796f384ebc2c50f03b1933 +mrblib/raylib.rb 98d89744b3ffefff688c982d791944043c83bd2d diff --git a/.yardoc/object_types b/.yardoc/object_types index 5225e0e..fa5a98a 100644 Binary files a/.yardoc/object_types and b/.yardoc/object_types differ diff --git a/.yardoc/objects/root.dat b/.yardoc/objects/root.dat index 171c994..7da1304 100644 Binary files a/.yardoc/objects/root.dat and b/.yardoc/objects/root.dat differ diff --git a/.yardopts b/.yardopts new file mode 100644 index 0000000..408a7e6 --- /dev/null +++ b/.yardopts @@ -0,0 +1,10 @@ +--markup markdown +--plugin mruby +--output-dir ./docs + +src/**/*.c +mrblib/**/*.rb +include/**/*.h + +src/*.c +./mrblib/*.rb diff --git a/Gemfile b/Gemfile index 500ca41..d2403f1 100644 --- a/Gemfile +++ b/Gemfile @@ -3,5 +3,3 @@ source "https://rubygems.org" # gem "rails" - -gem "yard", "~> 0.9.27" 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