eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.46k stars 314 forks source link

Revised site.serve() to use cactus chdir context manager #232

Closed dwightgunning closed 8 years ago

dwightgunning commented 8 years ago

Tthe 'serve' command needs to apply the filesystem listener to the .build directory but continue to operate under the root project folder to ensure relative paths continue to work.

dwightgunning commented 8 years ago

I would love to get some comments/feedback on this.

krallin commented 8 years ago

I haven't really ever worked on the serve parts (that'd be mostly @koenbok), but is the chdir even needed here?

I can't really see anything in Listener (or one of its subclasses) that relies on the current working directory (and all tests continue to pass without the chdir, though I'm not sure serve has great coverage).

dwightgunning commented 8 years ago

Good point. Looking at the Listener class, it seems that it is passed the paths that matter and it's using them explicitly.

Let me take a look at the test-suite and see what I can do. BTW: nice job on adding tests for the 'serve' command.

krallin commented 8 years ago

Going to close and reopen to get automated tests running

krallin commented 8 years ago

Thanks @dwightgunning !