()
| 121 | * Generate documentation for helpers that live outside of the main repo (Detox, MockRequest). |
| 122 | */ |
| 123 | export async function docsExternalHelpers() { |
| 124 | task.stopOnFailures() |
| 125 | say('Building @codecepjs/detox helper docs') |
| 126 | let helper = 'Detox' |
| 127 | replaceInFile(`node_modules/@codeceptjs/detox-helper/${helper}.js`, cfg => { |
| 128 | cfg.replace(/CodeceptJS.LocatorOrString/g, 'string | object') |
| 129 | cfg.replace(/LocatorOrString/g, 'string | object') |
| 130 | }) |
| 131 | await shell`npx documentation build node_modules/@codeceptjs/detox-helper/${helper}.js -o ${helperMarkDownFile(helper)} ${documentjsCliArgs}` |
| 132 | |
| 133 | await writeToFile(helperMarkDownFile(helper), line => { |
| 134 | line`---\npermalink: /helpers/${helper}\nsidebar: auto\ntitle: ${helper}\n---\n\n# ${helper}\n\n` |
| 135 | line.fromFile(helperMarkDownFile(helper)) |
| 136 | }) |
| 137 | |
| 138 | replaceInFile(`node_modules/@codeceptjs/detox-helper/${helper}.js`, cfg => { |
| 139 | cfg.replace(/string \| object/g, 'CodeceptJS.LocatorOrString') |
| 140 | cfg.replace(/string \| object/g, 'LocatorOrString') |
| 141 | }) |
| 142 | |
| 143 | await writeToFile(helperMarkDownFile(helper), line => { |
| 144 | line`---\npermalink: /helpers/${helper}\nsidebar: auto\ntitle: ${helper}\n---\n\n# ${helper}\n\n` |
| 145 | line.fromFile(helperMarkDownFile(helper)) |
| 146 | }) |
| 147 | |
| 148 | replaceInFile('node_modules/@codeceptjs/mock-request/index.js', cfg => { |
| 149 | cfg.replace(/string \| object/g, 'CodeceptJS.LocatorOrString') |
| 150 | cfg.replace(/string \| object/g, 'LocatorOrString') |
| 151 | }) |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * Generate documentation for the externally hosted Vue plugin. |
no test coverage detected