CabinJS/grunt-pages — pull request #36 by justinhelmer (2013-08-27 05:52:15+00:00)
Title: Fixing bug preventing posts from being generated if any file is a "draft...

..."

When attempting to use the "draft" functionality (filenames start with '_') on one post, suddenly none of the posts get built.

By going through grunt-pages, I found the culprit. The line that builds the posts first checks if (parsedPosts === numPosts). However, numPosts is incorrectly calculated, because it does not correctly ignore underscore files.

This commit sets "cwd" for grunt.file.expand() https://github.com/gruntjs/grunt/wiki/grunt.file#gruntfileexpand and fixes files[] so that underscore files are correctly found, and filtered out during the calculation of numPosts. It is possible that the pathing may have worked on a different platform (e.g. OSX), but I am running on a Windows machine. This cwd solution should be platform-agnostic.