首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Typedoc包括不起作用

Typedoc包括不起作用
EN

Stack Overflow用户
提问于 2018-08-07 10:28:48
回答 1查看 2.1K关注 0票数 2

我正在尝试使用typedoc include,所以我是这样做的。

代码语言:javascript
复制
// ./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的行,并且没有从我的标记文件中添加任何内容。我在这漏掉了什么?

EN

回答 1

Stack Overflow用户

发布于 2019-04-27 14:44:58

我不确定这是否一直在起作用。这是对我有用的。

https://typedoc.org/api/

我使用的是TypeDoc 0.14.2

这是我的命令行

代码语言:javascript
复制
typedoc --out docs ./src --includes ./doc

下面是我评论的一个例子

代码语言:javascript
复制
/**
 * 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的目录。

代码语言:javascript
复制
typedoc --out docs ./src --includes ./doc

评论

代码语言:javascript
复制
/**
 * 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]]
 */
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51724556

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档