Quantcast

Guard plugin for Asciidoctor

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Guard plugin for Asciidoctor

paulrayner
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Guard plugin for Asciidoctor

LightGuardjp
Administrator

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:

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Guard plugin for Asciidoctor

mojavelinux
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.

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Guard plugin for Asciidoctor

mojavelinux
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:

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. 

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 Action
Registered Linux User #231597

Loading...