docs(appium): update docs and reference integration
MODIFY
.gitignore
.gitignore
@@ -62,3 +62,4 @@ local_appium_home
jsdoc-out
*.tgz
typedoc-docs
+packages/appium/docs/*/reference

MODIFY
.husky/commit-msg
.husky/commit-msg
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
-commitlint --edit ${1}
+npx commitlint --edit ${1}

MODIFY
packages/appium/docs/en/cli/args.md
packages/appium/docs/en/cli/args.md
@@ -35,7 +35,7 @@ automatic docs generation tooling! Do not edit by hand! -->
|`--keep-alive-timeout`|Number of seconds the Appium server should apply as both the keep-alive timeout and the connection timeout for all requests. A value of 0 disables the timeout.|integer|`600`|`-ka`|
|`--local-timezone`|Use local timezone for timestamps|boolean|`false`||
|`--log`|Also send log output to this file|string||`-g`|
-|`--log-filters`|One or more log filtering rules|array<string>|||
+|`--log-filters`|One or more log filtering rules|array|||
|`--log-level`|Log level (console[:file]) (Value must be one of: `info`, `info:debug`, `info:info`, `info:warn`, `info:error`, `warn`, `warn:debug`, `warn:info`, `warn:warn`, `warn:error`, `error`, `error:debug`, `error:info`, `error:warn`, `error:error`, `debug`, `debug:debug`, `debug:info`, `debug:warn`, `debug:error`)|string|`debug`||
|`--log-no-colors`|Do not use color in console output|boolean|`false`||
|`--log-timestamp`|Show timestamps in console output|boolean|`false`||

DELETE
packages/appium/docs/en/reference.md
-{!appium_base_driver.md!}

MODIFY
packages/appium/docs/mkdocs-en.yml
packages/appium/docs/mkdocs-en.yml
@@ -45,7 +45,7 @@ nav:
- guides/log-filters.md
- guides/grid.md
- Developer Reference:
- - BaseDriver: reference.md
+ - BaseDriver: reference/base_driver.md
- Ecosystem:
- ecosystem/index.md
- Developing Appium Extensions:

MODIFY
packages/appium/docs/scripts/build-docs.js
packages/appium/docs/scripts/build-docs.js
@@ -13,6 +13,7 @@ const {
LATEST_ALIAS,
} = require('./utils');
const copyAssets = require('./copy-assets');
+const buildReference = require('./build-reference');
const path = require('path');
const semver = require('semver');
const {version} = require('../../package.json');
@@ -27,6 +28,7 @@ async function main() {
log.info(`Building Appium docs and committing to ${DOCS_BRANCH}`);
await copyAssets();
+ await buildReference();
const semVersion = semver.parse(version);
const majMinVer = `${semVersion.major}.${semVersion.minor}`;

ADD
packages/appium/docs/scripts/build-reference.js
+const {fs} = require('@appium/support');
+const {log, LANGS, DOCS_DIR} = require('./utils');
+const path = require('path');
+const monorepoRoot = path.resolve(__dirname, '..', '..', '..', '..');
+const typedocOut = path.resolve(monorepoRoot, 'typedoc-docs');
+const {exec} = require('teen_process');
+
+const typedocMap = [[['commands', 'appium_base_driver.md'], ['base_driver.md']]];
+
+async function main() {
+ log.info('Generating typedoc reference material');
+ await exec('npm', ['run', 'typedoc'], {cwd: monorepoRoot});
+
+ for (const lang of LANGS) {
+ const langRefPath = path.resolve(DOCS_DIR, lang, 'reference');
+ await fs.rimraf(langRefPath);
+ await fs.mkdirp(langRefPath);
+ for (const [from, to] of typedocMap) {
+ const sourcePath = path.resolve(typedocOut, ...from);
+ const destPath = path.resolve(langRefPath, ...to);
+ log.info(`Copying ${sourcePath} to ${destPath}`);
+ await fs.copyFile(sourcePath, destPath);
+ }
+ }
+}
+
+if (require.main === module) {
+ main().catch((err) => {
+ throw err;
+ });
+}
+
+module.exports = main;

MODIFY
packages/appium/package.json
packages/appium/package.json
"types"
],
"scripts": {
- "build:docs": "node ./scripts/parse-yml-commands.js",
+ "build:docs": "node docs/scripts/build-docs.js",
"build:docs:assets": "node docs/scripts/copy-assets.js",
"build:docs:cli": "node docs/scripts/gen-cli-args-docs.js",
+ "build:docs:reference": "node docs/scripts/build-reference.js",
"dev:docs": "npm run build:docs:assets && npm run dev:docs:en",
"dev:docs:en": "mkdocs serve -f ./docs/mkdocs-en.yml",
"dev:docs:ja": "mkdocs serve -f ./docs/mkdocs-ja.yml",

MODIFY
packages/docutils/base-mkdocs.yml
packages/docutils/base-mkdocs.yml
@@ -14,8 +14,6 @@ markdown_extensions:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- footnotes
- - markdown_include.include:
- base_path: ../../typedoc-docs/commands
extra:
generator: false

MODIFY
packages/docutils/requirements.txt
packages/docutils/requirements.txt
mkdocs==1.4.2
mkdocs-material==8.5.11
mkdocs-material-extensions==1.1.1
-markdown-include==0.8.0
mike==1.1.2

docs(appium): update docs and reference integration