Clean compile

61 views
Skip to first unread message

auxbuss

unread,
May 5, 2011, 5:52:04 PM5/5/11
to nanoc
Hi,

Noob here. I noticed after checking out down the git tree of my
project that a nanoc compile doesn't remove redundant pages. i.e.
pages created since the current checkout commit. This is a bit of a
problem when testing. I understand that --force does what it does, but
is there an option to clean output/ prior to compiling?

Ta,
Marc

Denis Defreyne

unread,
May 6, 2011, 2:43:35 AM5/6/11
to na...@googlegroups.com

Hi,

nanoc opts for a non-destructive approach, which means that stray files will remain in the output directory. Backwards compatibility is one of the reasons for this: storing files not managed by nanoc in the output directory used to be a recommended approach, and changing nanoc's behaviour to delete stray files would result in data loss.

The nanoc site has a rake task for removing stray files. Check out http://projects.stoneship.org/hg/sites-nanoc/file/ca4aa376dcb7/tasks/clean.rake. Alternatively, you could delete the output/ directory and recompile, but this would probably result in unnecessary recompiles. Come to think of it, a built-in command that does exactly this would probably be useful.

Cheers

Denis

Op 6 mei 2011 06:57 schreef "auxbuss" <aux...@gmail.com> het volgende:


--
You received this message because you are subscribed to the nanoc discusssion group.

To post to this group, send email to na...@googlegroups.com
To unsubscribe from this group, send email to nanoc+un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/nanoc

Reply all
Reply to author
Forward
0 new messages