Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @kosko/generate

Index

References

GenerateOptions

Re-exports GenerateOptions

Manifest

Re-exports Manifest

PrintFormat

Re-exports PrintFormat

PrintOptions

Re-exports PrintOptions

Result

Re-exports Result

ValidationError

Re-exports ValidationError

generate

Re-exports generate

print

Re-exports print

Functions

generate

  • Finds components with glob patterns in the specified path and returns exported values from each components.

    Extension names is optional in options.components because it's appended automatically. (e.g. foo => foo?(.{js,json}))

    Extensions are from require.extensions. You can require ts-node/register to add support for .ts extension.

    A component can export:

    • Object
    • Array
    • Function
    • Async function.

    Parameters

    Returns Promise<Result>

print

  • print(result: Result, __namedParameters: { format: PrintFormat; writer: Writable }): void
  • Print result to a stream.

    Parameters

    Returns void

Generated using TypeDoc