Skip to content

Instantly share code, notes, and snippets.

@f440
Created Jun 3, 2012
Embed
What would you like to do?
guard-livereload for sphinx
source 'https://rubygems.org'
gem 'guard-livereload'
gem 'guard-shell'
gem 'foreman'
guard 'shell' do
watch(%r{(.*)\.rst}) do |m|
system("sphinx-build -b html -d build/doctrees source build/html")
end
end
guard 'livereload' do
watch(%r{(.*)\.rst})
end
web: ruby -run -e httpd -- --port=3000 build/html
# -e httpd は ruby 1.9 系から利用可能。
# python -m SimpleHTTPServer 3000 でもいい(ただし、ドキュメントルルートはカレントディレクトリになる)
gaurd: bundle exec guard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment