Last active
August 29, 2015 14:07
-
-
Save FernandoBasso/dbc05815fe3d194f9560 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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