Permalink
Browse files

Updated docstar to only search one directory deep for a documentation…

… folder
  • Loading branch information...
1 parent dc455ed commit 84d0e7f8f3e7cd37e8f3699e2073098ca87e6b94 @DamonOehlman committed Jul 20, 2012
Showing with 4 additions and 3 deletions.
  1. +2 −2 lib/commands/config.js
  2. +2 −1 lib/docstar.js
View
4 lib/commands/config.js
@@ -80,7 +80,7 @@ exports.run = function(opts, callback) {
require('../docstar').init(function(err, instance) {
if (err) {
- out(err);
+ scaffolder.out(err);
}
else {
// create the config helper
@@ -91,7 +91,7 @@ exports.run = function(opts, callback) {
helper[action].call(helper, instance, scaffolder);
}
else {
- out('Do not know how to \'config ' + action + '\'');
+ scaffolder.out('Do not know how to \'config ' + action + '\'');
}
}
});
View
3 lib/docstar.js
@@ -73,7 +73,7 @@ DocStar.prototype.writeConfig = function(data, callback) {
};
exports.init = function(callback) {
- var pattern = '**/' + SPHINX_CONFIG_FILE;
+ var pattern = '*/' + SPHINX_CONFIG_FILE;
glob(pattern, function(err, matches) {
// iterate through the matches and filter out those in the node_modules
@@ -88,6 +88,7 @@ exports.init = function(callback) {
callback(null, docstar);
}
else {
+ debug('Found ' + matches.length + ' possible matches, cannot decide', matches);
callback('Too many possible documentation directories, please review');
}
});

0 comments on commit 84d0e7f

Please sign in to comment.