lift/framework — pull request #1586 by Shadowfiend (2014-06-20 04:34:26+00:00)
Title: So You Can Dexy While You Dexy

This PR does three big things:
- Introduce documentation for CSS selector transforms in the `doc/` directory. This is in the
asciidoc format.
- Introduce dexy for automating documentation builds. The current configuration is very pre-
liminary, and we'll probably want to be running things like API doc generation through there
soon.
- Add some helper stuff that lets dexy verify the examples in the CSS selector transforms
are correct.

That last bit is the big one. There is a series of examples at the very beginning of the CSS
selector docs, and they are presented as input, CSS selector transform, output. There is a
Scala helper (`ExtractCssSelectorExamples`) that reads the compiled document (once it's
been compiled to HTML), extracts the input/transform/output triplets, and generates a fully-
functioning specs2 specification from them with one specs2 example per documentation
example. When you run `dexy`, it will compile the document to HTML, run the extractor,
and then execute the specification. The build will fail if there are errors in the spec.

The documentation is emitted into `target/docs/`, but it can also be viewed as rendered by
Github at https://github.com/lift/framework/blob/so-you-can-dexy-while-you-dexy/docs/css-selectors.adoc .