Permalink
Browse files

Dynamically resolve jsdoc when running pbts, fixes #622

  • Loading branch information...
dcodeIO committed Jan 6, 2017
1 parent 69c04d7 commit 26d68e36e438b590589e5beaec418c63b8f939cf
Showing with 1 addition and 1 deletion.
  1. +1 −1 cli/pbts.js
@@ -97,7 +97,7 @@ exports.main = function(args, callback) {
// There is no proper API for jsdoc, so this executes the CLI and pipes the output
var basedir = path.join(__dirname, "..");
var moduleName = argv.name || "null";
var cmd = "node \"" + basedir + "/node_modules/jsdoc/jsdoc.js\" -c \"" + basedir + "/jsdoc.types.json\" -q \"module=" + encodeURIComponent(moduleName) + "&comments=" + Boolean(argv.comments) + "\" " + files.map(function(file) { return '"' + file + '"'; }).join(' ');
var cmd = "node \"" + require.resolve("jsdoc/jsdoc.js") + "\" -c \"" + path.join(basedir, "jsdoc.types.json") + "\" -q \"module=" + encodeURIComponent(moduleName) + "&comments=" + Boolean(argv.comments) + "\" " + files.map(function(file) { return "\"" + file + "\""; }).join(" ");
var child = child_process.exec(cmd, {
cwd: process.cwd(),
argv0: "node",

0 comments on commit 26d68e3

Please sign in to comment.