guard / guard-nanoc

A Guard for nanoc
39 stars 9 forks source link

Add :dir option #1

Closed bobthecow closed 11 years ago

bobthecow commented 11 years ago

Allows using guard-nanoc to recompile nanoc sites in subdirectories of guarded projects.

denisdefreyne commented 11 years ago

The problem is that Nanoc::Site.new doesn’t properly work if you give it a path that differs from ".". Too much stuff depends on the current working directory to be the nanoc site.

bobthecow commented 11 years ago
Dir.chdir(@base_dir) do
    site = ::Nanoc::Site.new(@base_dir)
    site.compile
end
denisdefreyne commented 11 years ago

That works! Can you update the pull request?

bobthecow commented 11 years ago

Yep :)