diff --git a/config/jsdoc-types.json b/cli/lib/tsd-jsdoc.json similarity index 89% rename from config/jsdoc-types.json rename to cli/lib/tsd-jsdoc.json index 41b84f333..9275370ec 100644 --- a/config/jsdoc-types.json +++ b/cli/lib/tsd-jsdoc.json @@ -11,7 +11,7 @@ "encoding" : "utf8", "recurse" : true, "lenient" : true, - "template" : "../lib/tsd-jsdoc", + "template" : "./tsd-jsdoc", "private" : false, "comments" : true, diff --git a/lib/tsd-jsdoc/LICENSE b/cli/lib/tsd-jsdoc/LICENSE similarity index 100% rename from lib/tsd-jsdoc/LICENSE rename to cli/lib/tsd-jsdoc/LICENSE diff --git a/lib/tsd-jsdoc/README.md b/cli/lib/tsd-jsdoc/README.md similarity index 100% rename from lib/tsd-jsdoc/README.md rename to cli/lib/tsd-jsdoc/README.md diff --git a/lib/tsd-jsdoc/publish.js b/cli/lib/tsd-jsdoc/publish.js similarity index 100% rename from lib/tsd-jsdoc/publish.js rename to cli/lib/tsd-jsdoc/publish.js diff --git a/cli/pbts.js b/cli/pbts.js index e47571668..245361678 100644 --- a/cli/pbts.js +++ b/cli/pbts.js @@ -96,9 +96,9 @@ exports.main = function(args, callback) { function callJsdoc() { // There is no proper API for jsdoc, so this executes the CLI and pipes the output - var basedir = path.join(__dirname, ".."); + var basedir = path.join(__dirname, "."); var moduleName = argv.name || "null"; - var cmd = "node \"" + require.resolve("jsdoc/jsdoc.js") + "\" -c \"" + path.join(basedir, "config", "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, "lib", "tsd-jsdoc.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", diff --git a/config/jsdoc-docs.json b/config/jsdoc.json similarity index 100% rename from config/jsdoc-docs.json rename to config/jsdoc.json diff --git a/package.json b/package.json index 5c04d1203..46a38c2ff 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "changelog": "node scripts/changelog -w", "coverage": "istanbul --config=config/istanbul.json cover node_modules/tape/bin/tape tests/*.js tests/node/*.js", "coverage-ci": "npm run coverage && codeclimate-test-reporter < coverage/lcov.info", - "docs": "jsdoc -c config/jsdoc-docs.json -R README.md --verbose --pedantic", + "docs": "jsdoc -c config/jsdoc.json -R README.md --verbose --pedantic", "lint": "eslint **/*.js -c config/eslint.json && tslint **/*.d.ts -e **/node_modules/** -t stylish -c config/tslint.json", "pages": "node scripts/pages", "prepublish": "node scripts/prepublish",