簡體   English   中英

Typedoc 包含不起作用

[英]Typedoc include doesn't work

我正在嘗試使用 typedoc include所以這是我的方法。

// ./src/store/index.ts

/**
 * [[include:TypeScriptReactReduxTutorial.md]]
 */

import { combineReducers } from 'redux'

import { counterReducer } from './counter/reducer'

import { IApplicationState } from './types'

/**
 *  Whenever an action is dispatched, Redux will update each top-level application state property
 * using the reducer with the matching name. It's important that the names match exactly, and that
 * the reducer acts on the corresponding IApplicationState property type.
 */
export const rootReducer = combineReducers<IApplicationState>({
  counter: counterReducer
})

然后像這樣運行 typedoc

"create-docs": "typedoc --out ./doc/ ./src --externalPattern '**/node_modules/**' --ignoreCompilerErrors --includes 'mdDocs/'"

但是在文檔中只添加了一行這樣的Defined in store/rootReducer.ts:18並且我的降價文件中沒有內容。 我在這里缺少什么?

我不確定這是否一直有效。 這對我有用。

https://typedoc.org/api/

我正在使用 TypeDoc 0.14.2

這是我的命令行

typedoc --out docs ./src --includes ./doc

這是我的評論的一個例子

/**
 * Process contents and returns a the processed contents.
 * <div>&nbsp;</div>
 * <strong>See:</strong> {@link BuildProcess.buildInclude}
 * @param contents The contents of the file currently being read
 * @param srcpath The source path of the file that contents were read from
 * @param destpath The destination file that the contents are to be written into.
 * @returns The contents of the file after they have been processed.
 * [[include:usercase.md]]
 */

更新 1

也可以包含一個目錄,然后包含子目錄中的 mardown 文件。 例如,我的 doc 目錄包含一個名為 javascript_string 的目錄。

typedoc --out docs ./src --includes ./doc

注釋

/**
 * Process contents and returns a the processed contents.
 * <div>&nbsp;</div>
 * <strong>See:</strong> [[BuildProcess.buildInclude]]
 * @param contents The contents of the file currently being read
 * @param srcpath The source path of the file that contents were read from
 * @param destpath The destination file that the contents are to be written into.
 * @return The contents of the file after they have been processed.
 * [[include:javascript_string/usercase.md]]
 */

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM