Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes: jsdoc generation fails when it encounters spaces in a path #10

Merged
merged 1 commit into from
Jul 7, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jester-tester",
"description": "Get your project tested and out there with minimal fuss.",
"repository": "https://github.com/jauco/jester",
"version": "1.3.0",
"version": "1.3.1",
"author": "Jauco Noordzij <code@jauco.nl>",
"bin": {
"jester-watch": "./src/bin/jester-watch.js",
Expand Down
12 changes: 8 additions & 4 deletions src/lib/rebuildDocumentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ module.exports = function rebuildDocumentation(srcPath, targetPath, confPath, re
}
};

var enquote = function enquote(str) {
return "\"" + str + "\"";
}

ensurePathExists(srcPath);
ensurePathExists(targetPath, "you must define a valid documentation directory by setting apiDocPath in jester.json");

// define command line options:
var options = "-r";
var src = p.resolve(srcPath);
var target = "-d " + p.resolve(targetPath);
var readme = pathExists(readmePath) ? p.resolve(readmePath) : "";
var conf = pathExists(confPath) ? "-c " + p.resolve(confPath) : "";
var src = enquote(p.resolve(srcPath));
var target = "-d " + enquote(p.resolve(targetPath));
var readme = pathExists(readmePath) ? enquote(p.resolve(readmePath)) : "";
var conf = pathExists(confPath) ? "-c " + enquote(p.resolve(confPath)) : "";

var jsdoc = require.resolve("jsdoc/jsdoc");
var cmd = ["node", jsdoc, readme, src, options, target, conf].join(" ");
Expand Down