UNPKG

@redocly/cli

Version:

[@Redocly](https://redocly.com) CLI is your all-in-one API documentation utility. It builds, manages, improves, and quality-checks your API descriptions, all of which comes in handy for various phases of the API Lifecycle. Create your own rulesets to make

9 lines 420 B
import * as path from 'node:path'; import { addPrefix } from './add-prefix.js'; export function addComponentsPrefix(description, componentsPrefix) { return description.replace(/"(#\/components\/.*?)"/g, (match) => { const componentName = path.basename(match); return match.replace(componentName, addPrefix(componentName, componentsPrefix)); }); } //# sourceMappingURL=add-components-prefix.js.map