For jsdoc to find plugins, we need to set the cwd

This allows the `build.js` (and the exports from `generate-info.js`) to be run with a different working directory.
This commit is contained in:
Tim Schaub
2014-07-14 14:42:42 -06:00
parent 4de2520109
commit 4f7073d7aa

View File

@@ -81,7 +81,8 @@ function spawnJSDoc(paths, callback) {
var output = '';
var errors = '';
var child = spawn(jsdoc, ['-c', jsdocConfig].concat(paths));
var cwd = path.join(__dirname, '..');
var child = spawn(jsdoc, ['-c', jsdocConfig].concat(paths), {cwd: cwd});
child.stdout.on('data', function(data) {
output += String(data);