Typedoc include doesn't work

2.7k Views Asked by At

I am trying to use typedoc include so here is how I do that.

// ./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
})

and then run typedoc like this

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

But in the docs there is only added a line like this Defined in store/rootReducer.ts:18 and no content from my markdown file. What am I missing in here?

1

There are 1 best solutions below

0
On

I am not certain if this is working all the way around. This is working for me.

https://typedoc.org/api/

I am using TypeDoc 0.14.2

Here is my command line

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

And here is an example of my comments

/**
 * 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]]
 */

Update 1

It is also possible to include a directory and then include mardown files from subdirectories. For example my doc directory contains a directory named javascript_string.

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

comments

/**
 * 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]]
 */