@droppedcode/typedoc-plugin-copy-assets
Version:
This plugin for typedoc copies the assets found in comments to the output assets folder.
75 lines (74 loc) • 2.51 kB
TypeScript
import { Application } from 'typedoc';
/**
* Copies the assets found in comments to the output assets folder.
*/
export declare class CopyAssets {
/** The current application. */
private _typedoc?;
/** Path for output. */
private _outFolder?;
/** Path for output medias. */
private _outMediaFolder?;
/** Maps a reflection to a source file it was created from. */
private _reflectionPaths;
/** Maps an image absolute path to a relative path in the output. */
private _referencePathMaps;
/** Path that we already used. */
private _usedOutputPaths;
/**
* The pattern used to find references in markdown.
*/
private _referencePattern;
private _imagePattern;
private _htmlImgTagPattern;
private _options;
private _includeList?;
private _excludeList?;
private _includePathList?;
private _excludePathList?;
/**
* Create a new RelativeIncludesConverterComponent instance.
* @param typedoc The application.
*/
initialize(typedoc: Readonly<Application>): void;
/**
* Get the folder path for the current item.
* @param n Node.
* @param r Reflection.
* @param c Context.
* @returns The folder path for the current context item or undefined.
*/
private getFolderPaths;
/**
* Get the first file the reflection was created from.
* @param reflection The reflection.
* @returns The file path.
*/
private getReflectionFilePath;
/**
* Get the file the node was created from.
* @param node The node.
* @returns The file path.
*/
private getNodeFilePath;
/**
* Process the text collecting the references from it and copying to the out folder.
* @param text The text to process.
* @param originalFolderPaths Possible paths of the parsed file.
* @param outputFilePath Path of the documentation file.
* @returns The modified comment.
*/
private processText;
/**
* Process a match, replacing it with the new path.
* @param originalFolderPaths Possible paths of the parsed file.
* @param outputFilePath Path of the documentation file.
* @param match Match to process.
* @param prefix Prefix of the match.
* @param pathGroup Path of of the resource.
* @param suffix Suffix of the match.
* @param allowNonRelativePaths Allow non relative paths to be processed.
* @returns The replacement of the match.
*/
private processMatch;
}