Parcourir la source

Make sure API docs are output to the right directory.

Ian Rose il y a 6 ans
Parent
commit
b83f00f2c1

+ 9 - 0
buildutils/src/ensure-package.ts

@@ -130,6 +130,15 @@ export async function ensurePackage(
     }
   });
 
+  // Handle typedoc config output.
+  const tdOptionsPath = path.join(pkgPath, 'tdoptions.json');
+  if (fs.existsSync(tdOptionsPath)) {
+    const tdConfigData = utils.readJSONFile(tdOptionsPath);
+    const pkgDirName = pkgPath.split('/').pop();
+    tdConfigData['out'] = `../../docs/api/${pkgDirName}`;
+    utils.writeJSONFile(tdOptionsPath, tdConfigData);
+  }
+
   // Handle references.
   let references: { [key: string]: string } = Object.create(null);
   Object.keys(deps).forEach(name => {

+ 1 - 1
packages/htmlviewer-extension/tdoptions.json

@@ -9,7 +9,7 @@
     "lib.es2015.promise.d.ts",
     "lib.dom.d.ts"
   ],
-  "out": "../../docs/api/observables",
+  "out": "../../docs/api/htmlviewer-extension",
   "baseUrl": ".",
   "paths": {
     "@jupyterlab/*": ["../packages/*"]

+ 1 - 1
packages/htmlviewer/tdoptions.json

@@ -9,7 +9,7 @@
     "lib.es2015.promise.d.ts",
     "lib.dom.d.ts"
   ],
-  "out": "../../docs/api/observables",
+  "out": "../../docs/api/htmlviewer",
   "baseUrl": ".",
   "paths": {
     "@jupyterlab/*": ["../packages/*"]

+ 1 - 1
packages/markdownviewer/tdoptions.json

@@ -9,7 +9,7 @@
     "lib.es2015.promise.d.ts",
     "lib.dom.d.ts"
   ],
-  "out": "../../docs/api/imageviewer",
+  "out": "../../docs/api/markdownviewer",
   "baseUrl": ".",
   "paths": {
     "@jupyterlab/*": ["../packages/*"]

+ 1 - 1
packages/statusbar/tdoptions.json

@@ -9,7 +9,7 @@
     "lib.es2015.promise.d.ts",
     "lib.dom.d.ts"
   ],
-  "out": "../../docs/api/statusbar-extension",
+  "out": "../../docs/api/statusbar",
   "baseUrl": ".",
   "paths": {
     "@jupyterlab/*": ["../packages/*"]