docs(appium): include all reference output in docs build
MODIFY
packages/appium/docs/mkdocs-en.yml
packages/appium/docs/mkdocs-en.yml
@@ -46,7 +46,8 @@ nav:
- guides/grid.md
- guides/caching.md
- Developer Reference:
- - BaseDriver: reference/base_driver.md
+ - BaseDriver Commands: reference/commands/appium_base_driver-1._appium_base_driver.md
+ - FakeDriver Commands: reference/commands/appium_fake_driver-1._appium_fake_driver.md
- Ecosystem:
- ecosystem/index.md
- Developing Appium Extensions:

MODIFY
packages/appium/docs/scripts/build-reference.js
packages/appium/docs/scripts/build-reference.js
@@ -7,10 +7,6 @@ const path = require('path');
const monorepoRoot = path.resolve(__dirname, '..', '..', '..', '..');
const {exec} = require('teen_process');
-const typedocMap = [
- [['commands', 'appium_base_driver-1._appium_base_driver.md'], ['base_driver.md']],
-];
-
async function main() {
log.info('Generating typedoc reference material');
await exec('npm', ['run', 'typedoc'], {cwd: monorepoRoot});
@@ -19,14 +15,12 @@ async function main() {
for (const lang of LANGS) {
const langRefPath = path.resolve(DOCS_DIR, lang, 'reference');
+ const typedocOutPath = path.resolve(monorepoRoot, typedocOut);
+ log.info(`Copying ${typedocOutPath} to ${langRefPath}`);
await fs.rimraf(langRefPath);
- await fs.mkdirp(langRefPath);
- for (const [from, to] of typedocMap) {
- const sourcePath = path.resolve(monorepoRoot, typedocOut, ...from);
- const destPath = path.resolve(langRefPath, ...to);
- log.info(`Copying ${sourcePath} to ${destPath}`);
- await fs.copyFile(sourcePath, destPath);
- }
+ await fs.copyFile(typedocOutPath, langRefPath);
+ // remove extraneous readme from typedoc
+ await fs.rimraf(path.resolve(langRefPath, 'README.md'));
}
}

docs(appium): include all reference output in docs build