Created
May 10, 2014 22:56
-
-
Save kuon/8ef8b8d0a20351bfae5e to your computer and use it in GitHub Desktop.
How to use nanoc with rerun
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
require 'bundler' | |
Bundler.require(:default, :server) | |
use Rack::Static, | |
:urls => ["/"], | |
:root => "output", | |
:index => 'index.html' | |
run Rack::File.new('output/') |
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
task :server do | |
fork do | |
exec 'bundle exec rackup -p 4567' | |
end | |
exec %{rerun -p "{Rules,Gemfile,content/**/*,lib/**/*,static/**/*,layouts/**/*}" -x nanoc compile} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment