Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FileCreator

File creation abstraction. To be extended with concrete implementations.

Hierarchy

Index

Constructors

constructor

Properties

Protected importsCreator

importsCreator: ImportsCreator

The imports creator to use for parsing the dependency tree.

Accessors

Protected additionalDependencies

fileExtension

  • get fileExtension(): string

Methods

create

  • create(parsedMarkdown: string, dependencies: Dependencies, identifier: string): string
  • Creates a file content from the parsed generic parts.

    Parameters

    • parsedMarkdown: string

      The markdown parsed from a MarkdownParser.

    • dependencies: Dependencies

      The dependencies to pass to the ImportsCreator.

    • identifier: string

      A (preferably) unique identifier that may be used for the component's name.

    Returns string

Protected createImports

Protected getComponentName

  • getComponentName(identifier: string): string
  • Generates a PascalCase component name based on the identifier

    Parameters

    • identifier: string

      A (preferably) unique identifier that may be used for the component's name.

    Returns string

Protected Abstract wrapParsedContent

  • wrapParsedContent(parsedMarkdown: string, parsedDependencies: string, identifier: string): string
  • Concrete implementation of the .create() method.

    Parameters

    • parsedMarkdown: string

      The markdown parsed from a MarkdownParser.

    • parsedDependencies: string
    • identifier: string

      A (preferably) unique identifier that may be used for the component's name.

    Returns string

Generated using TypeDoc