Browse Source

Fix clean-package and correct toc extension (#10332)

* Fix clean-package and correct toc extension

* Lint the code

* Update packages/toc-extension/README.md

Co-authored-by: Steven Silvester <ssilvester@apple.com>
Frédéric Collonval 3 years ago
parent
commit
9b5a6fd63d

+ 1 - 1
buildutils/src/clean-packages.ts

@@ -11,7 +11,7 @@ import { readJSONFile } from './utils';
 // Get all of the packages.
 const basePath = path.resolve('.');
 const baseConfig = readJSONFile(path.join(basePath, 'package.json'));
-const packageConfig = baseConfig.workspaces;
+const packageConfig = baseConfig.workspaces.packages;
 const skipSource = process.argv.indexOf('packages') === -1;
 const skipExamples = process.argv.indexOf('examples') === -1;
 

+ 1 - 0
dev_mode/package.json

@@ -285,6 +285,7 @@
       "@jupyterlab/statedb",
       "@jupyterlab/statusbar",
       "@jupyterlab/terminal",
+      "@jupyterlab/toc",
       "@jupyterlab/tooltip",
       "@jupyterlab/translation",
       "@jupyterlab/ui-components",

+ 1 - 0
jupyterlab/staging/package.json

@@ -285,6 +285,7 @@
       "@jupyterlab/statedb",
       "@jupyterlab/statusbar",
       "@jupyterlab/terminal",
+      "@jupyterlab/toc",
       "@jupyterlab/tooltip",
       "@jupyterlab/translation",
       "@jupyterlab/ui-components",

+ 3 - 0
packages/toc-extension/README.md

@@ -0,0 +1,3 @@
+# @jupyterlab/toc-extension
+
+A JupyterLab extension which provides an entry-point and commands for the [@jupyterlab/toc](../toc) package.

+ 7 - 3
packages/toc-extension/package.json

@@ -24,6 +24,9 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "style": "style/index.css",
+  "directories": {
+    "lib": "lib/"
+  },
   "files": [
     "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
     "style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
@@ -31,10 +34,10 @@
   ],
   "scripts": {
     "build": "tsc -b",
-    "clean": "rimraf lib",
-    "precommit": "lint-staged",
+    "clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
+    "docs": "typedoc src",
     "prepublishOnly": "npm run build",
-    "watch": "tsc -w"
+    "watch": "tsc -b --watch"
   },
   "dependencies": {
     "@jupyterlab/application": "^3.1.0-alpha.11",
@@ -49,6 +52,7 @@
   },
   "devDependencies": {
     "rimraf": "~3.0.0",
+    "typedoc": "~0.20.0-beta.27",
     "typescript": "~4.1.3"
   },
   "publishConfig": {

+ 4 - 0
packages/toc-extension/typedoc.json

@@ -0,0 +1,4 @@
+{
+  "out": "../../docs/api/toc-extension",
+  "theme": "../../typedoc-theme"
+}

+ 1 - 0
packages/toc/package.json

@@ -69,6 +69,7 @@
     "jest": "^26.4.2",
     "rimraf": "~3.0.0",
     "ts-jest": "^26.3.0",
+    "typedoc": "~0.20.0-beta.27",
     "typescript": "~4.1.3"
   },
   "publishConfig": {

+ 9 - 2
typedoc.js

@@ -19,6 +19,10 @@ const packages = [
   'coreutils',
   'csvviewer-extension',
   'csvviewer',
+  'debugger-extension',
+  'debugger',
+  'docprovider-extension',
+  'docprovider',
   'docmanager-extension',
   'docmanager',
   'docregistry',
@@ -53,8 +57,6 @@ const packages = [
   // 'metapackage',
   // 'nbconvert-css',
   'nbformat',
-  'shared-models',
-  'docprovider',
   'notebook-extension',
   'notebook',
   'observables',
@@ -70,6 +72,7 @@ const packages = [
   'settingeditor-extension',
   'settingeditor',
   'settingregistry',
+  'shared-models',
   'shortcuts-extension',
   'statedb',
   'statusbar-extension',
@@ -78,8 +81,12 @@ const packages = [
   'terminal',
   'theme-dark-extension',
   'theme-light-extension',
+  'toc',
+  'toc-extension',
   'tooltip-extension',
   'tooltip',
+  'translation-extension',
+  'translation',
   'ui-components-extension',
   'ui-components',
   'vdom-extension',