Skip to content

Instantly share code, notes, and snippets.

@FernandoBasso
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FernandoBasso/dbc05815fe3d194f9560 to your computer and use it in GitHub Desktop.
Save FernandoBasso/dbc05815fe3d194f9560 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby -wU
#
# Source:
#
# http://asciidoctor.org/docs/editing-asciidoc-with-live-preview/#using-bundler
#
Bundler.require(:default)
guard 'shell' do
watch(/^(?:common-lisp|ruby|rubyonrails|php|)\/(?:.*)\.adoc$/) { | arr |
puts "#{arr}"
Asciidoctor.convert_file(arr[0], :in_place => true,
:safe => 'server',
:header_footer => true,
)
}
end
#
# Run with:
#
# bundle exec guard
# vim: set filetype=ruby:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment