Created
June 3, 2012 09:51
-
-
Save f440/2862843 to your computer and use it in GitHub Desktop.
guard-livereload for sphinx
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
source 'https://rubygems.org' | |
gem 'guard-livereload' | |
gem 'guard-shell' | |
gem 'foreman' |
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
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 |
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
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