Imperative web help generator. Accepts the command definitions and constructs the full help text for the command node.

export

### Hierarchy

- WebHelpGenerator

## Index

### Constructors

- constructor

### Properties

- aliasList
- mConfig
- mDocsDir
- mFullCommandTree
- markdownIt
- sanitizeHomeDir
- singlePageHtml
- treeNodes

### Methods

- appendToSinglePageHtml
- buildChildrenSummaryTables
- buildCmdTreeHtml
- buildHelp
- genBreadcrumb
- genCommandHelpPage
- genDocsFooter
- genDocsHeader
- genPrintButton
- renderMarkdown
- writeTreeData

## Constructors

### constructor

- new WebHelpGenerator(fullCommandTree: ICommandDefinition, config: ImperativeConfig, webHelpDir: string): WebHelpGenerator

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:83

  Create an instance of WebHelpGenerator.

  #### Parameters

  - ##### fullCommandTree: ICommandDefinition

  - ##### config: ImperativeConfig

  - ##### webHelpDir: string

  #### Returns WebHelpGenerator

## Properties

### Private aliasList

aliasList: {}

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:76

Key value list of commands and their aliases

memberof

  WebHelpGenerator

#### Type declaration

- ##### [key: string]: string[]

### Private mConfig

mConfig: ImperativeConfig

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:48

Imperative config containing data about the CLI

memberof

  WebHelpGenerator

### Private mDocsDir

mDocsDir: string

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:55

Output directory for HTML doc pages

memberof

  WebHelpGenerator

### Private mFullCommandTree

mFullCommandTree: ICommandDefinition

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:41

Imperative command tree to build help for

memberof

  WebHelpGenerator

### Private markdownIt

markdownIt: any

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:62

Markdown-it module used to convert markdown to HTML

memberof

  WebHelpGenerator

### sanitizeHomeDir

sanitizeHomeDir: boolean = false

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:34

Specifies whether user's home directory should be redacted from help content

memberof

  WebHelpGenerator

### Private singlePageHtml

singlePageHtml: string

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:83

Used to build single page version of web help

memberof

  WebHelpGenerator

### Private treeNodes

treeNodes: IWebHelpTreeNode[]

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:69

List of nodes in command tree

memberof

  WebHelpGenerator

## Methods

### Private appendToSinglePageHtml

- appendToSinglePageHtml(definition: ICommandDefinition, rootCommandName: string, fullCommandName: string, htmlContent: string): void

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:285

  Appends help content for individual command/group to single page HTML

  #### Parameters

  - ##### definition: ICommandDefinition

  - ##### rootCommandName: string

  - ##### fullCommandName: string

  - ##### htmlContent: string

  #### Returns void

### Private buildChildrenSummaryTables

- buildChildrenSummaryTables(helpGen: DefaultHelpGenerator, fullCommandName: string): string

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:263

  Builds list of groups/commands with HTML links added

  #### Parameters

  - ##### helpGen: DefaultHelpGenerator

  - ##### fullCommandName: string

  #### Returns string

### Private buildCmdTreeHtml

- buildCmdTreeHtml(node: IWebHelpTreeNode): string

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:383

  Builds table of contents for flat view

  #### Parameters

  - ##### node: IWebHelpTreeNode

    Parent node whose children will be listed

  #### Returns string

  - HTML list of child nodes

### buildHelp

- buildHelp(cmdResponse: IHandlerResponseApi): void

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:103

  Build web help files and copy dependencies to output folder

  #### Parameters

  - ##### cmdResponse: IHandlerResponseApi

  #### Returns void

### Private genBreadcrumb

- genBreadcrumb(rootCommandName: string, fullCommandName: string): string

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:247

  Builds breadcrumb of HTML links to show command ancestry

  #### Parameters

  - ##### rootCommandName: string

  - ##### fullCommandName: string

  #### Returns string

### Private genCommandHelpPage

- genCommandHelpPage(definition: ICommandDefinition, fullCommandName: string, docsDir: string, parentNode: IWebHelpTreeNode): void

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:312

  Generates HTML help page for Imperative command

  #### Parameters

  - ##### definition: ICommandDefinition

  - ##### fullCommandName: string

  - ##### docsDir: string

  - ##### parentNode: IWebHelpTreeNode

  #### Returns void

### Private genDocsFooter

- genDocsFooter(): string

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:227

  Returns footer HTML for help page

  #### Returns string

### Private genDocsHeader

- genDocsHeader(title: string): string

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:211

  Returns header HTML for help page

  #### Parameters

  - ##### title: string

    Title string for the page

  #### Returns string

### Private genPrintButton

- genPrintButton(): string

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:237

  Returns print button to show in header of help page

  #### Returns string

### Private renderMarkdown

- renderMarkdown(markdownContent: string): string

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:197

  Converts Markdown string to HTML string. Any HTML tags contained in the input Markdown string will be escaped.

  #### Parameters

  - ##### markdownContent: string

    String containing Markdown content

  #### Returns string

  String containing HTML content

### Private writeTreeData

- writeTreeData(): void

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpGenerator.ts:398

  Writes data for building web help command tree to JS file

  #### Returns void

Generated using TypeDoc