NPM Build Utilities @ 0.1.3
    Preparing search index...

    Class DocumentStage

    Default package stage.

    0.1.0-alpha

    Hierarchy (View Summary)

    Index

    Config

    • Returns a default TypeDoc configuration object. For use as Stage.Args.Document.typeDoc.

      Parameters

      Returns {
          alwaysCreateEntryPointModule: true;
          basePath: string;
          blockTags: [...`@${string}`[], "@source", "@TODO", "@UPGRADE"];
          cascadedModifierTags: [
              ...`@${string}`[],
              "@alpha",
              "@beta",
              "@experimental",
              "@internal",
          ];
          categorizeByGroup: true;
          categoryOrder: ["Documentation", "*", "Other", "Internal", "Deprecated"];
          customFooterHtml: `<p>Copyright <a href="https://www.maddimathon.com" target="_blank">Maddi Mathon</a>, ${string}.</p><p>Site generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a>.</p>`;
          customFooterHtmlDisableWrapper: true;
          disableGit: false;
          disableSources: false;
          excludeInternal: false;
          excludeNotDocumented: false;
          excludePrivate: false;
          excludeProtected: false;
          excludeReferences: false;
          externalSymbolLinkMappings: {
              "@maddimathon/utility-typescript": {
                  Classify: "https://maddimathon.github.io/utility-typescript/Types/Objects/Classify.html";
                  CustomError: "https://maddimathon.github.io/utility-typescript/classes/CustomError.html";
                  "CustomError.Args": "https://maddimathon.github.io/utility-typescript/classes/CustomError/Args.html";
                  "CustomError.NodeCliError": "https://maddimathon.github.io/utility-typescript/classes/CustomError/NodeCliError.html";
                  Json: "https://maddimathon.github.io/utility-typescript/Types/Json.html";
                  "Json.PackageJson": "https://maddimathon.github.io/utility-typescript/Types/Json/PackageJson.html";
                  Logger: "https://maddimathon.github.io/utility-typescript/classes/Logger.html";
                  "Logger.Args": "https://maddimathon.github.io/utility-typescript/classes/Logger/Args.html";
                  mergeArgs: "https://maddimathon.github.io/utility-typescript/functions/mergeArgs.html";
                  MessageMaker: "https://maddimathon.github.io/utility-typescript/classes/MessageMaker.html";
                  "MessageMaker.BulkMsgArgs": "https://maddimathon.github.io/utility-typescript/classes/MessageMaker/BulkMsgArgs.html";
                  "MessageMaker.BulkMsgs": "https://maddimathon.github.io/utility-typescript/classes/MessageMaker/BulkMsgs.html";
                  "MessageMaker.Colour": "https://maddimathon.github.io/utility-typescript/classes/MessageMaker/Colour.html";
                  "MessageMaker.MsgArgs": "https://maddimathon.github.io/utility-typescript/classes/MessageMaker/MsgArgs.html";
                  node: "https://maddimathon.github.io/utility-typescript/classes/node.html";
                  "node.NodeConsole": "https://maddimathon.github.io/utility-typescript/classes/node/NodeConsole.html";
                  "node.NodeFiles": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles.html";
                  "node.NodeFiles.Args": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/Args.html";
                  "node.NodeFiles.CopyFileArgs": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/CopyFileArgs.html";
                  "node.NodeFiles.ReadDirArgs": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/ReadDirArgs.html";
                  "node.NodeFiles.ReadFileArgs": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/ReadFileArgs.html";
                  "node.NodeFiles.WriteFileArgs": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/WriteFileArgs.html";
                  NodeConsole: "https://maddimathon.github.io/utility-typescript/classes/node/NodeConsole.html";
                  NodeFiles: "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles.html";
                  "NodeFiles.Args": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/Args.html";
                  "NodeFiles.CopyFileArgs": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/CopyFileArgs.html";
                  "NodeFiles.ReadDirArgs": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/ReadDirArgs.html";
                  "NodeFiles.ReadFileArgs": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/ReadFileArgs.html";
                  "NodeFiles.WriteFileArgs": "https://maddimathon.github.io/utility-typescript/classes/node/NodeFiles/WriteFileArgs.html";
                  Objects: "https://maddimathon.github.io/utility-typescript/Types/Objects.html";
                  "Objects.Classify": "https://maddimathon.github.io/utility-typescript/Types/Objects/Classify.html";
                  "Objects.RecursivePartial": "https://maddimathon.github.io/utility-typescript/Types/Objects/RecursivePartial.html";
                  "Objects.RecursiveRequired": "https://maddimathon.github.io/utility-typescript/Types/Objects/RecursiveRequired.html";
                  PackageJson: "https://maddimathon.github.io/utility-typescript/Types/Json/PackageJson.html";
                  RecursivePartial: "https://maddimathon.github.io/utility-typescript/Types/Objects/RecursivePartial.html";
                  RecursiveRequired: "https://maddimathon.github.io/utility-typescript/Types/Objects/RecursiveRequired.html";
                  VariableInspector: "https://maddimathon.github.io/utility-typescript/classes/VariableInspector.html";
              };
              glob: {
                  GlobOptions: "https://github.com/search?q=repo%3Aisaacs%2Fnode-glob+path%3A%2F%5Esrc%5C%2F%2F+symbol%3AGlobOptions&type=code";
              };
              global: {
                  "Error.name": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name";
              };
              minify: {
                  Options: "https://github.com/search?q=repo%3ADefinitelyTyped%2FDefinitelyTyped+path%3A%2F%5Etypes%5C%2Fminify%5C%2F%2F+symbol%3AOptions&type=code";
              };
              prettier: { Options: "https://prettier.io/docs/options" };
              typescript: {
                  Awaited: "https://www.typescriptlang.org/docs/handbook/utility-types.html#awaitedtype";
                  Capitalize: "https://www.typescriptlang.org/docs/handbook/utility-types.html#intrinsic-string-manipulation-types";
                  ConstructorParameters: "https://www.typescriptlang.org/docs/handbook/utility-types.html#constructorparameterstype";
                  Error: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error";
                  "Error.cause": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause";
                  "Error.name": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name";
                  Exclude: "https://www.typescriptlang.org/docs/handbook/utility-types.html#excludeuniontype-excludedmembers";
                  Extract: "https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union";
                  InstanceType: "https://www.typescriptlang.org/docs/handbook/utility-types.html#instancetypetype";
                  Lowercase: "https://www.typescriptlang.org/docs/handbook/utility-types.html#intrinsic-string-manipulation-types";
                  NoInfer: "https://www.typescriptlang.org/docs/handbook/utility-types.html#noinfertype";
                  NonNullable: "https://www.typescriptlang.org/docs/handbook/utility-types.html#nonnullabletype";
                  Omit: "https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys";
                  OmitThisParameter: "https://www.typescriptlang.org/docs/handbook/utility-types.html#omitthisparametertype";
                  Parameters: "https://www.typescriptlang.org/docs/handbook/utility-types.html#parameterstype";
                  Partial: "https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype";
                  Pick: "https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys";
                  Promise: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise";
                  Record: "https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type";
                  RegExp: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp";
                  Required: "https://www.typescriptlang.org/docs/handbook/utility-types.html#requiredtype";
                  ReturnType: "https://www.typescriptlang.org/docs/handbook/utility-types.html#returntypetype";
                  ThisParameterType: "https://www.typescriptlang.org/docs/handbook/utility-types.html#thisparametertypetype";
                  ThisType: "https://www.typescriptlang.org/docs/handbook/utility-types.html#thistypetype";
                  Uncapitalize: "https://www.typescriptlang.org/docs/handbook/utility-types.html#intrinsic-string-manipulation-types";
                  Uppercase: "https://www.typescriptlang.org/docs/handbook/utility-types.html#intrinsic-string-manipulation-types";
              };
          };
          githubPages: true;
          groupOrder: [
              "*",
              "Documents",
              "Constructors",
              "Properties",
              "Accessors",
              "Functions",
              "Methods",
              "Classes",
              "Interfaces",
              "Type Aliases",
              "Namespaces",
              "Modules",
          ];
          groupReferencesByType: true;
          hideGenerator: true;
          highlightLanguages: [
              ...BundledLanguage[],
              "astro",
              "csv",
              "handlebars",
              "jsx",
              "latex",
              "markdown",
              "md",
              "php",
              "regex",
              "regexp",
              "sass",
              "scss",
              "sh",
              "shell",
              "shellscript",
              "sql",
              "swift",
          ];
          hostedBaseUrl: undefined
          | string;
          includeVersion: false;
          jsDocCompatibility: { exampleTag: false };
          kindSortOrder: [
              "Module",
              "Constructor",
              "Property",
              "Variable",
              "Function",
              "Accessor",
              "Method",
              "Enum",
              "EnumMember",
              "Class",
              "Interface",
              "TypeAlias",
              "TypeLiteral",
              "Namespace",
              "Reference",
              "Project",
          ];
          markdownLinkExternal: true;
          name: string;
          navigationLinks: { [key: string]: string };
          notRenderedTags: [...`@${string}`[], "@TODO", "@UPGRADE"];
          out: "docs";
          plugin: ["typedoc-plugin-inline-sources"];
          projectDocuments: ["README.md"];
          readme: "none";
          router: "structure";
          searchInComments: true;
          searchInDocuments: true;
          sort: [
              "documents-first",
              "static-first",
              "required-first",
              "kind",
              "visibility",
              "alphabetical",
          ];
          sourceLinkExternal: true;
          sourceLinkTemplate: | `undefined/blob/main/${string}{path}#L{line}`
          | `${string}/blob/main/${string}{path}#L{line}`;
          tsconfig: string;
          useFirstParagraphOfCommentAsSummary: true;
          visibilityFilters: {
              "@alpha": boolean;
              "@beta": true;
              external: true;
              inherited: true;
              private: boolean;
              protected: true;
          };
      }

    A completed args object for this instance.

    clr: Colour

    Colour used for colour-coding this stage.

    config: Config.Class

    Complete project configuration.

    name: string

    Name for this stage used for notices.

    params: Params

    Current CLI params.

    • get ARGS_DEFAULT(): {
          entryPoints: null;
          replace: (
              _stage: Stage,
          ) => { current: string[]; ignore: string[]; package: string[] };
          typeDoc: (
              _stage: Stage,
          ) => Partial<Omit<typeDoc.TypeDocOptions, "entryPoints">>;
          utils: {};
      }

      Default args for this stage.

      Returns {
          entryPoints: null;
          replace: (
              _stage: Stage,
          ) => { current: string[]; ignore: string[]; package: string[] };
          typeDoc: (
              _stage: Stage,
          ) => Partial<Omit<typeDoc.TypeDocOptions, "entryPoints">>;
          utils: {};
      }

      • ReadonlyentryPoints: null
      • replace: (_stage: Stage) => { current: string[]; ignore: string[]; package: string[] }
      • ReadonlytypeDoc: (_stage: Stage) => Partial<Omit<typeDoc.TypeDocOptions, "entryPoints">>
      • Readonlyutils: {}

    Constructor

    Errors

    • Alias for internal.writeLog.

      Parameters

      • msg: string | string[] | BulkMsgs

        Log message to write.

      • filename: string

        File name for the log.

      • subDir: string[] = []

        Subdirectories used for the path to write the log file.

      • date: null | Date = null

        Used for the timestamp.

      Returns string | false

      If false, writing the log failed. Otherwise, this is the path to the written log file.

    Project

    • get pkg(): {
          bin: undefined
          | string
          | { [key: string]: string };
          bugs: undefined | { email?: string; url?: string };
          config: undefined | { [key: string | number]: any };
          description: undefined | string;
          engines: undefined | { [key: string]: string };
          files: undefined | string[];
          homepage: undefined | string;
          license: undefined | string;
          main: undefined | string;
          name: string;
          repository: undefined | string;
          version: string;
      }

      Current value of the package.json file for this project.

      Returns {
          bin: undefined | string | { [key: string]: string };
          bugs: undefined | { email?: string; url?: string };
          config: undefined | { [key: string | number]: any };
          description: undefined | string;
          engines: undefined | { [key: string]: string };
          files: undefined | string[];
          homepage: undefined | string;
          license: undefined | string;
          main: undefined | string;
          name: string;
          repository: undefined | string;
          version: string;
      }

    Running

    subStages: Stage.SubStage.Document[] = ...

    All sub-stages to run in this stage (in order).

        public readonly subStages: Stage.SubStage.Document[] = [
    'typeDoc',
    'replace',
    ];
    • Prints a message to the console signalling the start or end of this build stage.

      Parameters

      • which: null | "start" | "end"

        Whether we are starting or ending.

      • watcherVersion: boolean = false

        Whether to display the watcher version of the message if applicable. Default false.

      Returns void | Promise<void>

    Sub-Stages

    Utilities

    compiler: Stage_Compiler

    Instance used to compile files from the src directory.

    console: Stage_Console

    Instance used to send messages to the console.

    • Replaces placeholders in files as defined by Config.replace.

      Parameters

      • globs: string[]

        Where to find & replace placeholders.

      • version: "package" | "current"

        Which version of the replacements to run.

      • level: number

        Depth level for output to the console.

      • ignore: string[] = []

        Globs to ignore while replacing. Default FileSystem.globs.SYSTEM.

      • docsMode: boolean = false

        Whether to make the replacements in 'docs' mode (i.e., assumes markdown in comments was converted to HTML).

      Returns string[]

      Paths where placeholders were replaced.