Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --watch option #43

Open
ggrossetie opened this issue Dec 7, 2018 · 0 comments
Open

Add a --watch option #43

ggrossetie opened this issue Dec 7, 2018 · 0 comments

Comments

@ggrossetie
Copy link
Member

$ asciidoctorjs source.adoc -o dest.pdf --watch

The above command will watch "source.adoc" for changes.
It may be a bad idea because users might expect the --watch to be smart and also watch for included files or resources (images...). So in the end it might be hard to provide something useful without knowing the workspace.

Another idea is to configure --watch:

$ asciidoctorjs source.adoc -o dest.pdf --watch 'includes/**.adoc' --watch 'images/*'

We could also decide to go one step further and add browser sync to automatically reload the browser.

$ asciidoctorjs source.adoc -o dest.html 

In this case, if I edit source.adoc, my browser will automatically refresh the content when I save my changes.

If we decide that it's not the job of the Asciidoctor CLI to provide such feature then we should document/explain how to setup live reload (or even provide a Node.js package that integrate with the CLI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant