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.
|
This is interesting, though I wonder if the wider audience of asciidoc users will find this as an odd way to interact with the engine. I had originally thought you'd call guard from asciidoc to have it watch the file it was called to process. Different way of doing things, not saying one approach is better than the other though. — Sent from Mailbox for iPhone On Sat, Mar 16, 2013 at 7:32 AM, paulrayner [via Asciidoctor :: Discussion] <[hidden email]> wrote:
|
Administrator
|
In reply to this post by paulrayner
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: 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. Dan Allen Principal Software Engineer, Red Hat | Author of Seam in ActionRegistered Linux User #231597 |
Administrator
|
In reply to this post by LightGuardjp
On Sat, Mar 16, 2013 at 6:24 PM, lightguard.jp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I think we want to support both cases. There are going to be people that prefer one way over the other, and that's fine. What I like about the Guard plugin is that it gives advanced users lots of flexibility to do exactly what they want with the watching. I suspect that the direct integration into the asciidoctor command will be more limited in scope (since the goal of that integration is to require no additional setup).
-Dan Dan Allen Principal Software Engineer, Red Hat | Author of Seam in ActionRegistered Linux User #231597 |
Free forum by Nabble | Edit this page |