From fb144faf59517fe3a41f66ad3ba6fdf5af000faa Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Wed, 17 Aug 2022 12:27:14 -0700 Subject: [PATCH] feat(): experimental support for typedoc generation Run `npm run typedoc` to generate docs in `typedoc-docs` dir. I thought I'd take a few mins and set this up. It was _mostly_ straightforward, except: 1. Figuring out the "entry point" for each package was difficult until I realized `.js` entry points are assumed to be compiled, and thus require a `sourceMappingUrl` reference. IMO this is probably a bug in TypeDoc 2. The `sourceMappingUrl` must reference an external sourcemap file; not an inline source map. If it's an inline source map, the system tries to `fs.open` a large data-url. 3. The babel config does not control whether external sourcemaps are created; `@babel/cli` does. So I needed to change those. 4. Practically speaking, I don't see any drawback to external sourcemaps _yet_ 5. TypeDoc has poor support for cross-package type references in monorepos, and I had to add a plugin which implements a workaround 6. Per some suggestions in the docs, I modified the order of references in the root `tsconfig.json` to start with "the biggest one first" I didn't modify any types or docstrings anywhere. --- .gitignore | 1 + babel.config.json | 2 +- package-lock.json | 174 +++++++++++++++++++- package.json | 3 + packages/appium/package.json | 5 +- packages/base-driver/package.json | 9 +- packages/base-plugin/package.json | 9 +- packages/doctor/package.json | 4 +- packages/docutils/package.json | 4 +- packages/execute-driver-plugin/package.json | 2 +- packages/fake-driver/package.json | 2 +- packages/fake-plugin/package.json | 2 +- packages/images-plugin/package.json | 2 +- packages/opencv/package.json | 2 +- packages/relaxed-caps-plugin/package.json | 2 +- packages/schema/package.json | 5 +- packages/support/package.json | 7 +- packages/test-support/package.json | 2 +- packages/types/package.json | 5 +- packages/universal-xml-plugin/package.json | 2 +- tsconfig.json | 12 +- typedoc.json | 11 ++ 22 files changed, 234 insertions(+), 33 deletions(-) create mode 100644 typedoc.json diff --git a/.gitignore b/.gitignore index 4dbba3c4e23..57aee24e881 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,4 @@ packages/*/LICENSE local_appium_home jsdoc-out *.tgz +typedoc-docs diff --git a/babel.config.json b/babel.config.json index 8cf5ee66f1a..c51bbc91e39 100644 --- a/babel.config.json +++ b/babel.config.json @@ -12,7 +12,7 @@ ], "plugins": ["source-map-support", "@babel/plugin-transform-runtime"], "comments": false, - "sourceMaps": "both", + "sourceMaps": true, "env": { "coverage": { "plugins": [ diff --git a/package-lock.json b/package-lock.json index 9447ee9a8d2..a3ef6dd3289 100644 --- a/package-lock.json +++ b/package-lock.json @@ -84,6 +84,8 @@ "sinon-chai": "3.7.0", "sync-monorepo-packages": "0.3.5", "through2": "4.0.2", + "typedoc": "0.23.10", + "typedoc-plugin-resolve-crossmodule-references": "0.3.0", "typescript": "4.7.4", "validate.js": "0.13.1", "webdriverio": "7.21.0", @@ -16591,6 +16593,12 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz", + "integrity": "sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==", + "dev": true + }, "node_modules/jsonfile": { "version": "6.1.0", "license": "MIT", @@ -17752,6 +17760,12 @@ "es5-ext": "~0.10.2" } }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, "node_modules/make-dir": { "version": "2.1.0", "dev": true, @@ -17877,8 +17891,9 @@ } }, "node_modules/marked": { - "version": "4.0.17", - "license": "MIT", + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.18.tgz", + "integrity": "sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw==", "bin": { "marked": "bin/marked.js" }, @@ -22769,6 +22784,17 @@ "version": "0.1.1", "license": "MIT" }, + "node_modules/shiki": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", + "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", + "dev": true, + "dependencies": { + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "5.2.0" + } + }, "node_modules/side-channel": { "version": "1.0.4", "license": "MIT", @@ -24583,6 +24609,60 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typedoc": { + "version": "0.23.10", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.10.tgz", + "integrity": "sha512-03EUiu/ZuScUBMnY6p0lY+HTH8SwhzvRE3gImoemdPDWXPXlks83UGTx++lyquWeB1MTwm9D9Ca8RIjkK3AFfQ==", + "dev": true, + "dependencies": { + "lunr": "^2.3.9", + "marked": "^4.0.18", + "minimatch": "^5.1.0", + "shiki": "^0.10.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 14.14" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x" + } + }, + "node_modules/typedoc-plugin-resolve-crossmodule-references": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-resolve-crossmodule-references/-/typedoc-plugin-resolve-crossmodule-references-0.3.0.tgz", + "integrity": "sha512-OhBwyvVDllmMcRGaWgcM2NoHxqVqqBmXYqhydcM0em9KKO3qf3qp+wC/cDTuLUC1al98LIvLnrggclDVsIZTSw==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typedoc": ">=0.22 <=0.23" + } + }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/typescript": { "version": "4.7.4", "devOptional": true, @@ -25181,6 +25261,18 @@ "node": ">=0.4.0" } }, + "node_modules/vscode-oniguruma": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "dev": true + }, + "node_modules/vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "dev": true + }, "node_modules/wcwidth": { "version": "1.0.1", "license": "MIT", @@ -38387,6 +38479,12 @@ "json5": { "version": "2.2.1" }, + "jsonc-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz", + "integrity": "sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==", + "dev": true + }, "jsonfile": { "version": "6.1.0", "requires": { @@ -39184,6 +39282,12 @@ "es5-ext": "~0.10.2" } }, + "lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, "make-dir": { "version": "2.1.0", "dev": true, @@ -39266,7 +39370,9 @@ "requires": {} }, "marked": { - "version": "4.0.17" + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.18.tgz", + "integrity": "sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw==" }, "marky": { "version": "1.2.4" @@ -42510,6 +42616,17 @@ "shellwords": { "version": "0.1.1" }, + "shiki": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", + "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", + "dev": true, + "requires": { + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "5.2.0" + } + }, "side-channel": { "version": "1.0.4", "requires": { @@ -43733,6 +43850,45 @@ "is-typedarray": "^1.0.0" } }, + "typedoc": { + "version": "0.23.10", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.10.tgz", + "integrity": "sha512-03EUiu/ZuScUBMnY6p0lY+HTH8SwhzvRE3gImoemdPDWXPXlks83UGTx++lyquWeB1MTwm9D9Ca8RIjkK3AFfQ==", + "dev": true, + "requires": { + "lunr": "^2.3.9", + "marked": "^4.0.18", + "minimatch": "^5.1.0", + "shiki": "^0.10.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, + "typedoc-plugin-resolve-crossmodule-references": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-resolve-crossmodule-references/-/typedoc-plugin-resolve-crossmodule-references-0.3.0.tgz", + "integrity": "sha512-OhBwyvVDllmMcRGaWgcM2NoHxqVqqBmXYqhydcM0em9KKO3qf3qp+wC/cDTuLUC1al98LIvLnrggclDVsIZTSw==", + "dev": true, + "requires": {} + }, "typescript": { "version": "4.7.4", "devOptional": true @@ -44145,6 +44301,18 @@ } } }, + "vscode-oniguruma": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "dev": true + }, + "vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "dev": true + }, "wcwidth": { "version": "1.0.1", "requires": { diff --git a/package.json b/package.json index 0a38574cb15..952e300e2fd 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "test:ci:e2e": "lerna run test:e2e", "test:e2e": "lerna run --parallel --max-buffer=128 test:e2e", "test:unit": "lerna run test", + "typedoc": "typedoc", "uninstall-fake-driver": "npm start -- driver uninstall fake", "upload": "gulp github-upload", "preversion": "run-s clean:artifacts build sync-pkgs && git add -A packages/appium/README.md packages/*/package.json", @@ -151,6 +152,8 @@ "sinon-chai": "3.7.0", "sync-monorepo-packages": "0.3.5", "through2": "4.0.2", + "typedoc": "0.23.10", + "typedoc-plugin-resolve-crossmodule-references": "0.3.0", "typescript": "4.7.4", "validate.js": "0.13.1", "webdriverio": "7.21.0", diff --git a/packages/appium/package.json b/packages/appium/package.json index 9d41b558a47..a4dfe629252 100644 --- a/packages/appium/package.json +++ b/packages/appium/package.json @@ -42,7 +42,7 @@ "types" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "build:docs": "node docs/scripts/build-docs.js", "build:docs:assets": "node docs/scripts/copy-assets.js", "dev": "npm run build -- --watch", @@ -108,5 +108,8 @@ "access": "public", "tag": "next" }, + "typedoc": { + "entryPoint": "./build/lib/main.js" + }, "gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72" } diff --git a/packages/base-driver/package.json b/packages/base-driver/package.json index 1ed081ca972..ce2e77008bd 100644 --- a/packages/base-driver/package.json +++ b/packages/base-driver/package.json @@ -23,6 +23,7 @@ }, "license": "Apache-2.0", "author": "https://github.com/appium", + "types": "./build/lib/index.d.ts", "directories": { "lib": "lib" }, @@ -34,7 +35,7 @@ "build" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", @@ -77,6 +78,8 @@ "publishConfig": { "access": "public" }, - "types": "./build/lib/index.d.ts", - "gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72" + "gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72", + "typedoc": { + "entryPoint": "./build/lib/index.js" + } } diff --git a/packages/base-plugin/package.json b/packages/base-plugin/package.json index 90b59a1ae85..6449dcecebd 100644 --- a/packages/base-plugin/package.json +++ b/packages/base-plugin/package.json @@ -2,6 +2,7 @@ "name": "@appium/base-plugin", "version": "1.10.2", "description": "The base plugin used to create Appium 2.0 plugins", + "homepage": "https://appium.io", "bugs": { "url": "https://github.com/appium/appium/issues" }, @@ -12,6 +13,7 @@ }, "license": "Apache-2.0", "author": "https://github.com/appium", + "types": "./build/lib/plugin.d.ts", "directories": { "lib": "./lib" }, @@ -21,7 +23,7 @@ "index.js" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", @@ -37,10 +39,11 @@ "node": ">=14", "npm": ">=8" }, - "types": "./build/lib/plugin.d.ts", "gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72", "tags": [ "appium" ], - "homepage": "https://appium.io" + "typedoc": { + "entryPoint": "./build/lib/plugin.js" + } } diff --git a/packages/doctor/package.json b/packages/doctor/package.json index fce707c2bbe..7fa1b9aa0cc 100644 --- a/packages/doctor/package.json +++ b/packages/doctor/package.json @@ -37,8 +37,8 @@ "build" ], "scripts": { - "build:lib": "babel lib --root-mode=upward --out-dir=build/lib", - "build:bin": "babel bin --root-mode=upward --out-dir=build/bin", + "build:lib": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", + "build:bin": "babel bin --source-maps --root-mode=upward --out-dir=build/bin", "build": "run-s build:*", "dev": "run-p \"build:lib -- --watch\" \"build:bin -- --watch\"", "fix": "npm run lint -- --fix", diff --git a/packages/docutils/package.json b/packages/docutils/package.json index 9c861ea2006..a7b5f8d7b54 100644 --- a/packages/docutils/package.json +++ b/packages/docutils/package.json @@ -29,8 +29,8 @@ ], "scripts": { "build": "npm run build:sources && npm run build:test", - "build:sources": "babel lib --root-mode=upward --out-dir=build/lib", - "build:test": "babel test --root-mode=upward --out-dir=build/test --copy-files", + "build:sources": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", + "build:test": "babel test --source-maps --root-mode=upward --out-dir=build/test --copy-files", "dev": "npm run build:sources -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", diff --git a/packages/execute-driver-plugin/package.json b/packages/execute-driver-plugin/package.json index e52349506b2..d72d3d1de3a 100644 --- a/packages/execute-driver-plugin/package.json +++ b/packages/execute-driver-plugin/package.json @@ -24,7 +24,7 @@ "index.js" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", diff --git a/packages/fake-driver/package.json b/packages/fake-driver/package.json index 341b6005146..828bf327594 100644 --- a/packages/fake-driver/package.json +++ b/packages/fake-driver/package.json @@ -36,7 +36,7 @@ "test/fixtures" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib --copy-files", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib --copy-files", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", diff --git a/packages/fake-plugin/package.json b/packages/fake-plugin/package.json index 4d5c9393ddc..35404408794 100644 --- a/packages/fake-plugin/package.json +++ b/packages/fake-plugin/package.json @@ -23,7 +23,7 @@ "build" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", diff --git a/packages/images-plugin/package.json b/packages/images-plugin/package.json index a1dde7ba21e..83241d64f93 100644 --- a/packages/images-plugin/package.json +++ b/packages/images-plugin/package.json @@ -26,7 +26,7 @@ "index.js" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", diff --git a/packages/opencv/package.json b/packages/opencv/package.json index 1a2c1ebd0cb..76ddc93cdb8 100644 --- a/packages/opencv/package.json +++ b/packages/opencv/package.json @@ -33,7 +33,7 @@ "build" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", diff --git a/packages/relaxed-caps-plugin/package.json b/packages/relaxed-caps-plugin/package.json index 504c020399c..15b124faa7a 100644 --- a/packages/relaxed-caps-plugin/package.json +++ b/packages/relaxed-caps-plugin/package.json @@ -21,7 +21,7 @@ "build" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", diff --git a/packages/schema/package.json b/packages/schema/package.json index 275cfbd63bc..06db54e1419 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -31,7 +31,7 @@ ], "scripts": { "build": "run-s build:*", - "build:distfiles": "babel lib --root-mode=upward --out-dir=build", + "build:distfiles": "babel lib --source-maps --root-mode=upward --out-dir=build", "build:schema-json": "node ./scripts/generate-schema-json.js", "dev": "npm run build:distfiles -- --watch", "fix": "npm run lint -- --fix", @@ -51,5 +51,8 @@ "publishConfig": { "access": "public" }, + "typedoc": { + "entryPoint": "./build/index.js" + }, "gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72" } diff --git a/packages/support/package.json b/packages/support/package.json index 96d766f950f..7fd3e9ebbe9 100644 --- a/packages/support/package.json +++ b/packages/support/package.json @@ -33,7 +33,7 @@ "build" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", @@ -110,5 +110,8 @@ "publishConfig": { "access": "public" }, - "gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72" + "gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72", + "typedoc": { + "entryPoint": "./build/lib/index.js" + } } diff --git a/packages/test-support/package.json b/packages/test-support/package.json index 716c330d2fb..975b125629d 100644 --- a/packages/test-support/package.json +++ b/packages/test-support/package.json @@ -38,7 +38,7 @@ "build" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", diff --git a/packages/types/package.json b/packages/types/package.json index c4a2d5cf460..5664613b8f5 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -46,5 +46,8 @@ "publishConfig": { "access": "public" }, - "gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72" + "gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72", + "typedoc": { + "entryPoint": "./lib/index.ts" + } } diff --git a/packages/universal-xml-plugin/package.json b/packages/universal-xml-plugin/package.json index 4652a7ef164..e8d97b888da 100644 --- a/packages/universal-xml-plugin/package.json +++ b/packages/universal-xml-plugin/package.json @@ -25,7 +25,7 @@ "lib" ], "scripts": { - "build": "babel lib --root-mode=upward --out-dir=build/lib", + "build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib", "dev": "npm run build -- --watch", "fix": "npm run lint -- --fix", "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .", diff --git a/tsconfig.json b/tsconfig.json index d53e115d976..c5d22fe9c21 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,10 +5,7 @@ }, "references": [ { - "path": "packages/schema" - }, - { - "path": "packages/types" + "path": "packages/appium" }, { "path": "packages/support" @@ -20,10 +17,13 @@ "path": "packages/base-plugin" }, { - "path": "packages/test-support" + "path": "packages/schema" }, { - "path": "packages/appium" + "path": "packages/types" + }, + { + "path": "packages/test-support" }, { "path": "packages/fake-plugin" diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 00000000000..334c895a314 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["./packages/appium", "./packages/base-driver", "./packages/support", "./packages/types", "./packages/base-plugin"], + "entryPointStrategy": "packages", + "name": "Appium", + "includeVersion": false, + "tsconfig": "./tsconfig.json", + "out": "typedoc-docs", + "cleanOutputDir": true, + "plugin": ["typedoc-plugin-resolve-crossmodule-references"] +}