Skip to content

Commit

Permalink
Add info on yard server command
Browse files Browse the repository at this point in the history
  • Loading branch information
lsegal committed Jun 23, 2010
1 parent acd0fcf commit 8849af3
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions README.md
Expand Up @@ -165,7 +165,7 @@ You can also add a `.yardopts` file to your project directory which lists
the switches separated by whitespace (newlines or space) to pass to yardoc
whenever it is run.

<h4>Queries</h4>
#### Queries

The `yardoc` tool also supports a `--query` argument to only include objects
that match a certain data or meta-data query. The query syntax is Ruby, though
Expand Down Expand Up @@ -226,7 +226,37 @@ You can also do lookups on any installed gems. Just make sure to build the
If you don't have sudo access, it will write these files to your `~/.yard`
directory. `yri` will also cache lookups there.

**4. `yard graph` Graphviz Generator**
**4. `yard server` Documentation Server**

The `yard server` command serves documentation for a local project or all installed
RubyGems. To serve documentation for a project you are working on, simply run:

$ yard server

And the project inside the current directory will be parsed (if the source has
not yet been scanned by YARD) and served at [http://localhost:8808](http://localhost:8808).

#### Live Reloading

If you want to serve documentation on a project while you document it so that
you can preview the results, simply pass `--reload` (`-r`) to the above command
and YARD will reload any changed files on each request. This will allow you to
change any documentation in the source and refresh to see the new contents. Note
that this feature may cause the class listing to display incorrectly, and because of
this, is not meant for serving finalized documentation.

#### Serving Gems

To serve documentation for all installed gems, call:

$ yard server --gems

This will also automatically build documentation for any gems that have not
been previously scanned. Note that in this case there will be a slight delay
between the first request of a newly parsed gem.


**5. `yard graph` Graphviz Generator**

You can use `yard-graph` to generate dot graphs of your code. This, of course,
requires [Graphviz](http://www.graphviz.org) and the `dot` binary. By default
Expand Down

0 comments on commit 8849af3

Please sign in to comment.