Login  Register

Re: Guard plugin for Asciidoctor

Posted by mojavelinux on Mar 18, 2013; 3:17am
URL: https://discuss.asciidoctor.org/Guard-plugin-for-Asciidoctor-tp53p60.html

Paul,

This is excellent!

I gave it a run through and came up with some ideas for how to honor Asciidoctor options. I think it's as simple as forwarding the guard options on to Asciidoctor.

If overrides are needed per document, they can always be set in the document itself. To make that easier, I've assigned the attribute 'guard' so that you can do conditional inclusion, such as:

ifdef::guard[]
:stylesheet: my-test-stylesheet.css
endif::guard[]

Here's the pull request with my changes:

https://github.com/paulrayner/guard-asciidoc/pull/1

With this changes in place, using the plugin as as simple as:

.Guardfile
----
guard :asciidoc
----

Voila!

-Dan

On Sat, Mar 16, 2013 at 7:32 AM, paulrayner [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I got a really basic first-cut version of a Guard plugin working. See my comments on https://github.com/asciidoctor/asciidoctor/issues/191 for details.

Any and all feedback appreciated. 

Thanks,
Paul.



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Guard-plugin-for-Asciidoctor-tp53.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://google.com/profiles/dan.j.allen
http://mojavelinux.com
http://mojavelinux.com/seaminaction