Skip to content

Instantly share code, notes, and snippets.

@steveh
Created January 19, 2017 00:37
Show Gist options
  • Save steveh/57cee3dd827e954a905ad644942ae9a1 to your computer and use it in GitHub Desktop.
Save steveh/57cee3dd827e954a905ad644942ae9a1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "pathname"
root = Pathname.new(".")
libs = root.children.select(&:directory?).collect(&:realpath)
libs.each do |lib|
Dir.chdir(lib.realpath.to_s) do
system "yard"
end
end
args = ["yard", "server", "-m"] + libs.collect(&:basename).collect(&:to_s).flat_map { |lib| [lib, "#{lib}/.yardoc"] }
exec args.join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment