Skip to content

Instantly share code, notes, and snippets.

@kuon
Created May 10, 2014 22:56
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 kuon/8ef8b8d0a20351bfae5e to your computer and use it in GitHub Desktop.
Save kuon/8ef8b8d0a20351bfae5e to your computer and use it in GitHub Desktop.
How to use nanoc with rerun
require 'bundler'
Bundler.require(:default, :server)
use Rack::Static,
:urls => ["/"],
:root => "output",
:index => 'index.html'
run Rack::File.new('output/')
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