From 29ce6cae0cacc0f1d87ca47e64be6a81325aaa55 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Mon, 27 Mar 2017 16:20:04 +0200 Subject: [PATCH] CLI: Moved tsd-jsdoc to future cli package, see #716 --- config/jsdoc-types.json => cli/lib/tsd-jsdoc.json | 2 +- {lib => cli/lib}/tsd-jsdoc/LICENSE | 0 {lib => cli/lib}/tsd-jsdoc/README.md | 0 {lib => cli/lib}/tsd-jsdoc/publish.js | 0 cli/pbts.js | 4 ++-- config/{jsdoc-docs.json => jsdoc.json} | 0 package.json | 2 +- 7 files changed, 4 insertions(+), 4 deletions(-) rename config/jsdoc-types.json => cli/lib/tsd-jsdoc.json (89%) rename {lib => cli/lib}/tsd-jsdoc/LICENSE (100%) rename {lib => cli/lib}/tsd-jsdoc/README.md (100%) rename {lib => cli/lib}/tsd-jsdoc/publish.js (100%) rename config/{jsdoc-docs.json => jsdoc.json} (100%) 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",