Options
All
  • Public
  • Public/Protected
  • All
Menu

Package @tscmono/plugin-workspace

Index

References

Command Classes

Type aliases

Command Variables

Plugin Definition Variables

Config Functions

TSConfig Generation Functions

References

generateTsConfigs

Re-exports generateTsConfigs

getConfig

Re-exports getConfig

packageToTsConfig

Re-exports packageToTsConfig

Type aliases

TSConfigTemplate

TSConfigTemplate: { content: any & { references: { path: string }[] }; path: string }

Describe what should be written to the filesystem for a tsconfig

Type declaration

  • content: any & { references: { path: string }[] }

    The content to be written

  • path: string

    The path of the file to be writte

Command Variables

Const commandPath

commandPath: string[] = ['generate', 'workspace']

The command path of the WorkspaceCommand

Plugin Definition Variables

Const commands

commands: WorkspaceCommand[] = [WorkspaceCommand,]

Define commands exported from this plugin

Const runOnDefault

runOnDefault: true = true

State that this plugin should be run from BaseCommand

Const runOnDefaultPath

runOnDefaultPath: string[] = commandPath

Path to be run from BaseCommand

Const runOnDefaultPriority

runOnDefaultPriority: 20 = 20

Run priority of this plugin when evaluated by BaseCommand

Config Functions

Const getConfig

  • getConfig(rootDir?: string): Promise<(Overrides & Preset) | (Overrides & Presets) | (Overrides & Extends)>
  • Obtain the monorepo tscmono config using cosmiconfig

    Parameters

    • Default value rootDir: string = process.cwd()

      Optional directory from which to obtain the repo config

    Returns Promise<(Overrides & Preset) | (Overrides & Presets) | (Overrides & Extends)>

TSConfig Generation Functions

Const generateTsConfigs

  • generateTsConfigs(rootDir?: string): Promise<{ content: any & { references: { path: string }[] }; path: string }[]>
  • Generate TSConfigTemplates for all workspaces

    Parameters

    • Default value rootDir: string = process.cwd()

      The root directory to be used when generating tsConfigs

    Returns Promise<{ content: any & { references: { path: string }[] }; path: string }[]>

Const packageToTsConfig

  • Generate a TSConfigTemplate for a specific workspace, given the root configuration, base template, the root directory and the workspaces list

    Parameters

    • pkg: WorkspaceConfig

      The package (workspace) name

    • rootConfig: WorkspaceRootConfig

      The root configuration

    • rootDir: string

      The root directory

    • tpl: any

      The base template

    • pkgList: Record<string, WorkspaceConfig>

      The packages (workspaces) list

    Returns Promise<TSConfigTemplate>

Generated using TypeDoc