Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Guard gem for YARD.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGES.markdown
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 guard-yard.gemspec
README.markdown

Guard::Yard

Guard::Yard allows you to automatically run and update your local YARD Documentation Server. It aims to centralize your file monitoring to guard instead of using the yard server --reload command which can be unreliable and provides little control over the generated documentation. Guard::Yard monitors files and updates only the documentation than changes, as opposed to generating the entire documentation suite. That means that changes to your documentation are available sooner!

Requirements

  • The YARD documentation tool.
  • The Guard rubygem.
  • Ruby 1.9.2 or higher.

Install

Add guard-yard to your Gemfile (inside development group):

gem 'guard-yard'

Install or update your bundle:

bundle install

Add the default guard-yard definition to your Guardfile:

guard init yard

Guardfile

Please read the Guardfile DSL documentation for additional information.

Guard::Yard automatically detects changes in your app, lib and ext directories, but you can have it monitor additional files using the Guardfile DSL.

Guard::Yard also provides some basic options for doc generation and running the YARD server.

guard 'yard', :port => '8808' do
  ...
end

Available options:

:port => '8808'         # Port on which the server shoud run.
:stdout => 'yard.log'   # File in which to log the yard server output.
:stderr => '/dev/null'  # File in which to log the yard server errors.
:cli => '--plugin rest' # Additional command line options to be appended to the server command.

Clean-Slate Documentation

To generate or re-create documentation from a clean-slate, run the following command:

rm -rf .yardoc && yard doc

When booting guard, Guard::Yard will do this for you automatically if no .yardoc directory is present. Once guard is running you can execute this command by using the Ctrl-\ key combination as well.

Troubleshooting

If you are running into issues, try re-creating your documentation using rm -rf .yardoc && yard doc. Once this operation is complete, restart guard. If you are still having problems, open a new issue in the GitHub issue tracker for this project.

Something went wrong with that request. Please try again.